diff --git a/docs/app/docs/components/link/docs/codeUsage.js b/docs/app/docs/components/link/docs/codeUsage.js new file mode 100644 index 000000000..22b7474a4 --- /dev/null +++ b/docs/app/docs/components/link/docs/codeUsage.js @@ -0,0 +1,34 @@ +// Import API documentation +import link_api_SourceCode from './component_api/link.tsx'; + +const code = { + javascript: { + code: `import Link from "@radui/ui/Link" + +const LinkExample = () => ( + Rad UI +)` + }, + scss: { + code: `.rad-ui-link{ + color: var(--rad-ui-color-indigo-900); +} +.rad-ui-link:hover{ + text-decoration: underline; +}` + }, +}; + +// API documentation +export const api_documentation = { + link: link_api_SourceCode, +}; + +// Component features +export const features = [ + "Supports external and internal navigation", + "Adjustable sizes", + "Accessible keyboard navigation", +]; + +export default code; diff --git a/docs/app/docs/components/link/docs/component_api/link.tsx b/docs/app/docs/components/link/docs/component_api/link.tsx new file mode 100644 index 000000000..078a55113 --- /dev/null +++ b/docs/app/docs/components/link/docs/component_api/link.tsx @@ -0,0 +1,62 @@ +const data = { + name: "Link", + description: "Hyperlink component for navigation between pages or external resources.", + columns: [ + { + name: "Prop", + id: "prop", + }, + { + name: "Type", + id: "type", + }, + { + name: "Default", + id: "default", + } + ], + data: [ + { + prop: { + name: "href", + info_tooltips: "Destination URL for the link.", + }, + type: "string", + default: "--", + }, + { + prop: { + name: "children", + info_tooltips: "Link text or element.", + }, + type: "ReactNode", + default: "--", + }, + { + prop: { + name: "target", + info_tooltips: "Where to open the linked document.", + }, + type: "string", + default: "'_self'", + }, + { + prop: { + name: "size", + info_tooltips: "Visual size of the link.", + }, + type: "string", + default: "'medium'", + }, + { + prop: { + name: "className", + info_tooltips: "Additional CSS class names.", + }, + type: "string", + default: "''", + } + ] +}; + +export default data; diff --git a/docs/app/docs/components/link/examples/LinkExample.tsx b/docs/app/docs/components/link/examples/LinkExample.tsx new file mode 100644 index 000000000..120efea23 --- /dev/null +++ b/docs/app/docs/components/link/examples/LinkExample.tsx @@ -0,0 +1,13 @@ +import Link from "@radui/ui/Link"; + +const LinkExample = () => { + return ( +
+ + Visit Rad UI + +
+ ); +}; + +export default LinkExample; diff --git a/docs/app/docs/components/link/page.mdx b/docs/app/docs/components/link/page.mdx new file mode 100644 index 000000000..185112dae --- /dev/null +++ b/docs/app/docs/components/link/page.mdx @@ -0,0 +1,44 @@ +import Documentation from '@/components/layout/Documentation/Documentation'; +import Link from '@radui/ui/Link'; +import codeUsage, { api_documentation, features } from './docs/codeUsage'; +import LinkExample from './examples/LinkExample'; +import linkMetadata from './seo'; + +export const metadata = linkMetadata; + + + {/* Component Hero */} + + + + + {/* Component Features */} + + + {/* Embedded Storybook */} + +