-
-
Notifications
You must be signed in to change notification settings - Fork 455
feat: add HR
component
#1346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: add HR
component
#1346
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0fab538
feat/hr -- HR Component added
dhavalveera 8fe1e24
fix: Code Example formatting issue fixed
dhavalveera f3a4dff
fixed based on AI Reviews
dhavalveera 8e02950
typecheck error fixed
dhavalveera a3df6d5
fix: exporting other components issue fixed
dhavalveera b8f4a62
fix: removed redundant fragments
dhavalveera a364bd8
small doc fix
dhavalveera 78a4585
fix: moved the HR from common to under Typography in Sidebar Items
dhavalveera 1c00383
fix: moved hr.mdx from /components/ to /typography/
dhavalveera f22e0f2
Merge branch 'main' into feat/hr-divider
SutuSebastian 643b84d
fix: sidebar `HR` slug
SutuSebastian a7b6231
fix: docs `HR` examples
SutuSebastian 9906174
add changeset
SutuSebastian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: React Horizontal Line (HR) - Flowbite | ||
description: Create a horizontal line using the HR tag to separate content such as paragraphs, blockquotes, and other elements using the utility classes from Tailwind CSS | ||
--- | ||
|
||
The HR component can be used to separate content using a horizontal line by adding space between elements based on multiple styles, variants, and layouts. | ||
|
||
## Default HR | ||
|
||
Use this example to separate text content with a <hr /> horizontal line. | ||
|
||
<Example name="hr.root" /> | ||
|
||
## Trimmed | ||
|
||
Use this example to show a shorter version of the horizontal line. | ||
|
||
<Example name="hr.trimmed" /> | ||
|
||
## Icon HR | ||
|
||
This example can be used to set a custom [SVG icon](https://flowbite.com/icons/) in the middle of the HR element. | ||
|
||
<Example name="hr.icon" /> | ||
|
||
## HR with Text | ||
|
||
Use this example to add a text in the middle of the HR component. | ||
|
||
<Example name="hr.text" /> | ||
|
||
## HR Shape (square) | ||
|
||
This example can be used to separate content with an HR tag as a shape instead of a line. | ||
|
||
<Example name="hr.square" /> | ||
|
||
## Theme | ||
|
||
To learn more about how to customize the appearance of components, please see the [Theme docs](/docs/customize/theme). | ||
|
||
<Theme name="hr" /> | ||
|
||
## References | ||
|
||
- [Flowbite HR](https://flowbite.com/docs/typography/hr/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { HRIcon } from "flowbite-react"; | ||
import type { CodeData } from "~/components/code-demo"; | ||
|
||
const code = ` | ||
"use client"; | ||
|
||
import { HR } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HR.Icon /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
const codeRSC = ` | ||
import { HRTrimmed } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HRIcon /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
function Component() { | ||
return ( | ||
<> | ||
<p className="text-gray-500 dark:text-gray-400"> | ||
Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest | ||
data from other software development tools, so your IT support and operations teams have richer contextual | ||
information to rapidly respond to requests, incidents, and changes. | ||
</p> | ||
|
||
<HRIcon /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400"> | ||
Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate | ||
critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every | ||
change. | ||
</p> | ||
</> | ||
); | ||
} | ||
|
||
export const icon: CodeData = { | ||
type: "single", | ||
code: [ | ||
{ | ||
fileName: "client", | ||
language: "tsx", | ||
code, | ||
}, | ||
{ | ||
fileName: "server", | ||
language: "tsx", | ||
code: codeRSC, | ||
}, | ||
], | ||
githubSlug: "/hr/hr.icon.tsx", | ||
component: <Component />, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { HR } from "flowbite-react"; | ||
import type { CodeData } from "~/components/code-demo"; | ||
|
||
const code = ` | ||
"use client"; | ||
|
||
import { HR } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HR /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
const codeRSC = ` | ||
import { HR } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HR /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
function Component() { | ||
return ( | ||
<> | ||
<p className="text-gray-500 dark:text-gray-400"> | ||
Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest | ||
data from other software development tools, so your IT support and operations teams have richer contextual | ||
information to rapidly respond to requests, incidents, and changes. | ||
</p> | ||
<HR /> | ||
<p className="text-gray-500 dark:text-gray-400"> | ||
Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate | ||
critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every | ||
change. | ||
</p> | ||
</> | ||
); | ||
} | ||
|
||
export const root: CodeData = { | ||
type: "single", | ||
code: [ | ||
{ | ||
fileName: "client", | ||
language: "tsx", | ||
code, | ||
}, | ||
{ | ||
fileName: "server", | ||
language: "tsx", | ||
code: codeRSC, | ||
}, | ||
], | ||
githubSlug: "/hr/hr.root.tsx", | ||
component: <Component />, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { HRSquare } from "flowbite-react"; | ||
import type { CodeData } from "~/components/code-demo"; | ||
|
||
const code = ` | ||
"use client"; | ||
|
||
import { HR } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HR.Square /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
const codeRSC = ` | ||
import { HRTrimmed } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HRSquare /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
function Component() { | ||
return ( | ||
<> | ||
<p className="text-gray-500 dark:text-gray-400"> | ||
Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest | ||
data from other software development tools, so your IT support and operations teams have richer contextual | ||
information to rapidly respond to requests, incidents, and changes. | ||
</p> | ||
|
||
<HRSquare /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400"> | ||
Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate | ||
critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every | ||
change. | ||
</p> | ||
</> | ||
); | ||
} | ||
|
||
export const square: CodeData = { | ||
type: "single", | ||
code: [ | ||
{ | ||
fileName: "client", | ||
language: "tsx", | ||
code, | ||
}, | ||
{ | ||
fileName: "server", | ||
language: "tsx", | ||
code: codeRSC, | ||
}, | ||
], | ||
githubSlug: "/hr/hr.square.tsx", | ||
component: <Component />, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { HRText } from "flowbite-react"; | ||
import type { CodeData } from "~/components/code-demo"; | ||
|
||
const code = ` | ||
"use client"; | ||
|
||
import { HR } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HR.Text text="or" /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
const codeRSC = ` | ||
import { HRTrimmed } from "flowbite-react"; | ||
|
||
function Component() { | ||
return ( | ||
<p className="text-gray-500 dark:text-gray-400">Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest data from other software development tools, so your IT support and operations teams have richer contextual information to rapidly respond to requests, incidents, and changes.</p> | ||
|
||
<HRText /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400">Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every change.</p> | ||
) | ||
} | ||
`; | ||
|
||
function Component() { | ||
return ( | ||
<> | ||
<p className="text-gray-500 dark:text-gray-400"> | ||
Track work across the enterprise through an open, collaborative platform. Link issues across Jira and ingest | ||
data from other software development tools, so your IT support and operations teams have richer contextual | ||
information to rapidly respond to requests, incidents, and changes. | ||
</p> | ||
|
||
<HRText text="or" /> | ||
|
||
<p className="text-gray-500 dark:text-gray-400"> | ||
Deliver great service experiences fast - without the complexity of traditional ITSM solutions.Accelerate | ||
critical development work, eliminate toil, and deploy changes with ease, with a complete audit trail for every | ||
change. | ||
</p> | ||
</> | ||
); | ||
} | ||
|
||
export const text: CodeData = { | ||
type: "single", | ||
code: [ | ||
{ | ||
fileName: "client", | ||
language: "tsx", | ||
code, | ||
}, | ||
{ | ||
fileName: "server", | ||
language: "tsx", | ||
code: codeRSC, | ||
}, | ||
], | ||
githubSlug: "/hr/hr.text.tsx", | ||
component: <Component />, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.