-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bdfa8b
commit f12b246
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
docs/app/docs/components/visually-hidden/docs/codeUsage.js
This file contains 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,18 @@ | ||
const code = { | ||
javascript: { | ||
code: `import VisuallyHidden from "@radui/ui/VisuallyHidden"" | ||
const VisualltHiddenExample = () => ( | ||
<VisuallyHidden asChild> | ||
<span>This is a visually hidden text</span> | ||
</VisuallyHidden> | ||
)` | ||
}, | ||
scss: { | ||
code: `.rad-ui-visually-hidden { | ||
display: none; | ||
}` | ||
}, | ||
} | ||
|
||
export default code; |
This file contains 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,44 @@ | ||
const PAGE_NAME = 'VISUALLY_HIDDEN_DOCS' | ||
import Documentation from "@/components/layout/Documentation/Documentation" | ||
|
||
|
||
import VisuallyHidden from "@radui/ui/VisuallyHidden" | ||
import SEO from "../../docsIndex" | ||
export const metadata = SEO.getMetadata(PAGE_NAME) | ||
|
||
import codeUsage from "./docs/codeUsage" | ||
|
||
const VisuallyHiddenDocs = () => { | ||
|
||
const columns = [ | ||
{name: 'Prop', key: 'prop'}, | ||
{name: 'Type', key: 'type'}, | ||
{name: 'Default', key: 'default'}, | ||
{name: 'Description', key: 'description'}, | ||
]; | ||
|
||
const data = [ | ||
{prop: 'asChild', type: 'boolean', default: 'false', description: 'renders the children in desired element'}, | ||
|
||
]; | ||
|
||
|
||
return <div> | ||
<Documentation currentPage={PAGE_NAME} title='Visually Hidden' description={`Use these helpers to visually hide elements but keep them accessible to assistive technologies.`}> | ||
<Documentation.ComponentHero codeUsage={codeUsage}> | ||
<div> | ||
<VisuallyHidden asChild> | ||
<span>This is a visually hidden text</span> | ||
</VisuallyHidden> | ||
</div> | ||
</Documentation.ComponentHero> | ||
|
||
|
||
<div > | ||
<Documentation.Table columns={columns} data={data} /> | ||
</div> | ||
</Documentation> | ||
</div> | ||
} | ||
|
||
export default VisuallyHiddenDocs; |
This file contains 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