-
-
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.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4bdfa8b
commit 68e6b1a
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
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,20 @@ | ||
const code = { | ||
javascript: { | ||
code: `import AspectRatio from "@radui/ui/AspectRatio"` | ||
|
||
const AspectRatioExample = () => ( | ||
<AspectRatio ratio='16/9'> | ||
<img | ||
style={{ width: '100%', height: '100%', objectFit: 'cover' }} | ||
className="Image" | ||
src="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg?cs=srgb&dl=pexels-bri-schneiter-28802-346529.jpg&fm=jpg" | ||
alt="Landscape photograph" | ||
/> | ||
</AspectRatio> | ||
)` | ||
|
||
} | ||
} | ||
|
||
|
||
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,47 @@ | ||
const PAGE_NAME = 'ASPECT_RATIO_DOCS' | ||
import Documentation from "@/components/layout/Documentation/Documentation" | ||
|
||
|
||
import AspectRatio from "@radui/ui/AspectRatio" | ||
import SEO from "../../docsIndex" | ||
export const metadata = SEO.getMetadata(PAGE_NAME) | ||
|
||
import codeUsage from "./docs/codeUsage" | ||
|
||
const AspectRatioDocs = () => { | ||
const columns = [ | ||
{name: 'Prop', key: 'prop'}, | ||
{name: 'Type', key: 'type'}, | ||
{name: 'Default', key: 'default'}, | ||
{name: 'Description', key: 'description'}, | ||
]; | ||
|
||
const data = [ | ||
{prop: 'ratio', type: 'string', default: '1', description: 'Used to set desired ratio'}, | ||
|
||
]; | ||
return <div> | ||
<Documentation currentPage={PAGE_NAME} title='Aspect Ratio' description={` | ||
Aspect Ratio is used to set the desired ratio. | ||
`}> | ||
<Documentation.ComponentHero codeUsage={codeUsage}> | ||
<div> | ||
<AspectRatio ratio='16/9'> | ||
<img | ||
style={{ width: '100%', height: '100%', objectFit: 'cover' }} | ||
className="Image" | ||
src="https://images.pexels.com/photos/346529/pexels-photo-346529.jpeg?cs=srgb&dl=pexels-bri-schneiter-28802-346529.jpg&fm=jpg" | ||
alt="Landscape photograph" | ||
/> | ||
</AspectRatio> | ||
</div> | ||
</Documentation.ComponentHero> | ||
<div className="max-w-screen-md"> | ||
<Documentation.Table columns={columns} data={data} /> | ||
</div> | ||
</Documentation> | ||
|
||
</div> | ||
} | ||
|
||
export default AspectRatioDocs; |
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