@ziky/ui
v0.2.0
Published
Shared UI components/layout for RIDIN MFEs
Readme
ridin-mfe-ui
Shared UI package for RIDIN MFEs (published to npm as @ziky/ui).
Usage
import React from 'react';
import { SmartCheckbox } from '@ziky/ui';
export function Example() {
const [value, setValue] = React.useState(false);
return <SmartCheckbox label="Active" value={value} onValueChange={setValue} />;
}React Hook Form (via Controller):
import { Controller } from 'react-hook-form';
import { SmartCheckbox } from '@ziky/ui';
<Controller
name="isActive"
control={control}
render={({ field, fieldState }) => (
<SmartCheckbox
label="Active"
value={field.value ?? false}
onValueChange={field.onChange}
errorText={fieldState.error?.message}
/>
)}
/>Storybook
npm install
npm run storybookBuild static:
npm run build-storybookVercel settings:
- Build Command:
npm run build-storybook - Output Directory:
storybook-static
Build
npm install
npm run build:libPublish
npm publish --access public