mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): ux improvements & redesign
This is a squash merge of a bajillion messy small commits created while iterating on the UI component library and redesign.
This commit is contained in:
committed by
Kent Keirsey
parent
a47d91f0e7
commit
f0b102d830
@@ -0,0 +1,21 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import type { InvTextProps } from './types';
|
||||
import { InvText } from './wrapper';
|
||||
|
||||
const meta: Meta<typeof InvText> = {
|
||||
title: 'Primitives/InvText',
|
||||
tags: ['autodocs'],
|
||||
component: InvText,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof InvText>;
|
||||
|
||||
const Component = (props: InvTextProps) => {
|
||||
return <InvText {...props}>Banana sushi is delectable!</InvText>;
|
||||
};
|
||||
|
||||
export const Default: Story = {
|
||||
render: Component,
|
||||
};
|
||||
21
invokeai/frontend/web/src/common/components/InvText/theme.ts
Normal file
21
invokeai/frontend/web/src/common/components/InvText/theme.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineStyle, defineStyleConfig } from '@chakra-ui/react';
|
||||
|
||||
const baseStyle = defineStyle(() => ({
|
||||
fontSize: 'sm',
|
||||
}));
|
||||
|
||||
const error = defineStyle(() => ({
|
||||
color: 'error.400',
|
||||
}));
|
||||
|
||||
const subtext = defineStyle(() => ({
|
||||
color: 'base.400',
|
||||
}));
|
||||
|
||||
export const textTheme = defineStyleConfig({
|
||||
baseStyle,
|
||||
variants: {
|
||||
subtext,
|
||||
error,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
import type { TextProps as ChakraTextProps } from '@chakra-ui/react';
|
||||
|
||||
export type InvTextProps = ChakraTextProps;
|
||||
@@ -0,0 +1 @@
|
||||
export { Text as InvText } from '@chakra-ui/react';
|
||||
Reference in New Issue
Block a user