Tansy UI: a themeable React component kit
Tansy UI is a React component kit by OpenKhalix, named after the tansy
flower ("golden buttons"). It has two surfaces:
- A landing page built entirely from the kit's own components, with
five featured parts, a palette-switching playground form, and links
into Storybook
- A Storybook workshop with Tansy branding, a Welcome page, palette
toolbar and accessibility checks
Includes 15 components with colocated tokens and stories, seven brand
palettes, a palette-aware logo, a Docker/nginx image, a scripted
cPanel deploy, and a generator that keeps the landing page catalogue
in sync with Storybook.
This commit is contained in:
commit
9d406d6d2a
81 files changed
+14240
No files matched your search
@@ -0,0 +1,37 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react-vite'
|
||||
import { TextField } from './TextField'
|
||||
|
||||
const meta = {
|
||||
title: 'Data entry/Text field',
|
||||
component: TextField,
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: 'A labeled form field with optional help text and accessible validation feedback.',
|
||||
},
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
error: {
|
||||
control: 'text',
|
||||
},
|
||||
},
|
||||
args: {
|
||||
label: 'Email address',
|
||||
hint: 'Use an address you can check today.',
|
||||
placeholder: '[email protected]',
|
||||
},
|
||||
} satisfies Meta<typeof TextField>
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Default: Story = {}
|
||||
|
||||
export const WithError: Story = {
|
||||
args: {
|
||||
error: 'Enter a valid email address.',
|
||||
defaultValue: 'not-an-email',
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user