packages/ui: elements style
apps/web: page render elements from meta
This commit is contained in:
parent
87f5af9c9c
commit
0424d8da50
@ -17,7 +17,7 @@ export default async function Page(props: Props) {
|
||||
<Content>
|
||||
<Background>
|
||||
<div className="grid auto-rows-auto grid-cols-2 gap-2 ">
|
||||
{Object.keys(data).map((name) => (
|
||||
{Object.keys(metaData).map((name) => (
|
||||
<Input
|
||||
key={name}
|
||||
id={name}
|
||||
@ -25,6 +25,7 @@ export default async function Page(props: Props) {
|
||||
type="text"
|
||||
required={metaData[name].required}
|
||||
defaultValue={data[name]}
|
||||
disabled={metaData[name].disabled}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
||||
import type { ButtonHTMLAttributes } from 'react';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
const variants = cva('rounded-sm px-5 py-2.5 text-sm font-medium text-white', {
|
||||
const variants = cva('rounded-sm h-10 px-5 py-2.5 text-sm font-medium text-white', {
|
||||
defaultVariants: {
|
||||
color: 'default',
|
||||
},
|
||||
|
||||
@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
const variants = cva(
|
||||
'block w-full rounded-sm border border-gray-300 p-2 text-sm text-gray-900 outline-none transition-all ease-linear hover:border-primary-500 hover:transition-all focus:border-primary-500 focus:transition-all'
|
||||
'hover:border-primary-500 focus:border-primary-500 block w-full rounded-sm border disabled:hover:border-gray-300 border-gray-300 h-9 p-2 px-3 text-sm text-gray-900 outline-none transition-all ease-linear hover:transition-all focus:transition-all disabled:cursor-not-allowed disabled:text-opacity-30'
|
||||
);
|
||||
|
||||
export type InputProps = React.InputHTMLAttributes<HTMLInputElement> &
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user