From 96d59f228a8809d4b7b47071800c603dfea266ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulo=20Lagoa=CC=81?= Date: Fri, 8 Nov 2024 14:36:56 +0000 Subject: [PATCH] docs: add `Card` documentation --- apps/docs/src/pages/components/card.mdx | 157 +++++++++++++++++++++++- 1 file changed, 156 insertions(+), 1 deletion(-) diff --git a/apps/docs/src/pages/components/card.mdx b/apps/docs/src/pages/components/card.mdx index 096b501dd1..519e6d3226 100644 --- a/apps/docs/src/pages/components/card.mdx +++ b/apps/docs/src/pages/components/card.mdx @@ -18,4 +18,159 @@ export const getStaticProps = async ({ params }) => { - + + +```jsx live +} +> + Schedule New Job} + icon={} + subheader={ + + Run data backups or maintenance tasks on your schedule + + } + /> + + + + Set up a job to run automatically at your preferred time and frequency. + + + + Configure Job +
+ Set Schedule + + +``` + +### Media + +You can place an image on your card using the `HvCardMedia` component. It will adapt to the location of the card it is placed on. + +```jsx live + + + + + Use the live code editor to change the position of the `HvCardMedia` + component in the card. + + + +``` + +### Actions + +If you want to add actions to the card, you can use the `HvActionBar` component. + +```jsx live +<> + + Start using UI Kit now + } + subheader={ + + Get started with the Hitachi Vantara UI Kit and build your next + project. + + } + /> + + } variant="primarySubtle"> + Github + +
+ }>Get Started + + + +``` + +### Selectable + +You can mark a card as selectable by adding the `selectable` prop. The `selected` prop indicates whether or not the card is selected. + +```jsx live +import { useState } from "react"; + +export default function Demo() { + const [checked, setChecked] = useState(null); + const storages = [ + { + name: "Local Storage", + icon: , + description: "Use local storage for quick access to user settings.", + }, + { + name: "Cloud Storage", + icon: , + description: "Use cloud storage for secure, scalable data access.", + }, + ]; + + return ( +
+ {storages.map((p, idx) => { + return ( + +
+ } + /> + + {p.description} + + + + ); + })} +
+ ); +} +``` + +