Skip to content

Commit ce485e9

Browse files
authored
docs-migration testing batch (#889)
1 parent e0d157f commit ce485e9

File tree

6 files changed

+1872
-26
lines changed

6 files changed

+1872
-26
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const code = {
2+
javascript: {
3+
code: `import AspectRatio from "@radui/ui/AspectRatio"
4+
5+
const AspectRatioExample = () => (
6+
<AspectRatio ratio='16/9'>
7+
<img
8+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
9+
className="Image"
10+
src="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg?cs=srgb&dl=pexels-bri-schneiter-28802-346529.jpg&fm=jpg"
11+
alt="Landscape photograph"
12+
/>
13+
</AspectRatio>
14+
)`
15+
16+
}
17+
}
18+
19+
export const AspectRatioTable = {
20+
columns : [
21+
{name: 'Prop', id: 'prop'},
22+
{name: 'Type', id: 'type'},
23+
{name: 'Default', id: 'default'},
24+
{name: 'Description', id: 'description'},
25+
],
26+
27+
data :[
28+
{prop: 'ratio', type: 'string', default: '1', description: 'Used to set desired ratio', id: 'ratio'},
29+
30+
]
31+
}
32+
33+
34+
export default code;
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
# Aspect Ratio
1+
import Documentation from "@/components/layout/Documentation/Documentation"
2+
import AspectRatio from "@radui/ui/AspectRatio"
3+
import codeUsage, { AspectRatioTable } from "./docs/codeUsage"
4+
5+
6+
<Documentation title={`AspectRatio`} description={`
7+
Aspect Ratio is used to set the desired ratio.
8+
`}>
9+
<Documentation.ComponentHero codeUsage={codeUsage}>
10+
11+
<AspectRatio ratio='16/9'>
12+
<img
13+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
14+
className="Image"
15+
src="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg?cs=srgb&dl=pexels-bri-schneiter-28802-346529.jpg&fm=jpg"
16+
alt="Landscape photograph"
17+
/>
18+
</AspectRatio>
19+
20+
</Documentation.ComponentHero>
21+
22+
<Documentation.Table columns={AspectRatioTable.columns} data={AspectRatioTable.data} />
23+
24+
</Documentation>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const code = {
2+
javascript: {
3+
code: `import Badge from "@radui/ui/Badge"
4+
5+
const BadgeExample = () => (
6+
<div>
7+
<Badge>Badge</Badge>
8+
</div>
9+
)`
10+
},
11+
scss: {
12+
code: `/** Badge */
13+
.rad-ui-badge {
14+
background-color: var(--rad-ui-color-accent-300);
15+
color: var(--rad-ui-color-accent-950);
16+
padding:4px 8px;
17+
display: flex;
18+
align-items: center;
19+
justify-content: center;
20+
font-weight: 600;
21+
border-radius: 4px;
22+
}`
23+
},
24+
}
25+
26+
export const BadgeTable ={
27+
columns: [
28+
{name: 'Prop', id: 'prop'},
29+
{name: 'Type', id: 'type'},
30+
{name: 'Default', id: 'default'},
31+
{name: 'Description', id: 'description'},
32+
],
33+
34+
data : [
35+
{prop: 'color', type: 'string', default: 'null', description: 'Accent color of the component', id: 'color'},
36+
]
37+
}
38+
export default code;
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1-
# Badge
1+
import Documentation from "@/components/layout/Documentation/Documentation"
2+
import Badge from "@radui/ui/Badge"
3+
import codeUsage, {BadgeTable} from "./docs/codeUsage"
24

3-
## Under Construction
5+
<Documentation title={`Badge`} description={`
6+
Badges are used to display a small amount of information. They are used in the sidebar, and in the chat.
7+
`}>
8+
<Documentation.ComponentHero codeUsage={codeUsage}>
9+
10+
<Badge>Badge</Badge>
11+
12+
</Documentation.ComponentHero>
13+
14+
15+
16+
<Documentation.Table columns={BadgeTable.columns} data={BadgeTable.data} />
17+
18+
19+
</Documentation>

0 commit comments

Comments
 (0)