feat: title

This commit is contained in:
TrèsAbhi committed 2024-08-06 14:08:47 -05:00
1 parent 4b2367699a
commit bfc7d76853
1 file changed
+11 -18
+11 -18
View File
@@ -10,10 +10,12 @@ import {
Button, Button,
Card, Card,
Flex, Flex,
Heading,
IconButton, IconButton,
Inset, Inset,
ScrollArea, ScrollArea,
Select, Select,
Separator,
Switch, Switch,
Text, Text,
TextField, TextField,
@@ -106,6 +108,8 @@ export function EmbedConfigInputs({
style={{ height: '100%', maxWidth: 320 }} style={{ height: '100%', maxWidth: 320 }}
> >
<Flex direction="column" gap="2" p="4"> <Flex direction="column" gap="2" p="4">
<Heading mb="4">Customize</Heading>
<Button <Button
variant="outline" variant="outline"
color="gray" color="gray"
@@ -137,7 +141,6 @@ export function EmbedConfigInputs({
control = ( control = (
<> <>
<Select.Root <Select.Root
size="1"
value={`${(state[key] as EmbedConfigItemType<EmbedConfigType.FullTextControl>).color}`} value={`${(state[key] as EmbedConfigItemType<EmbedConfigType.FullTextControl>).color}`}
onValueChange={(value) => { onValueChange={(value) => {
mutateState((draft) => { mutateState((draft) => {
@@ -206,7 +209,6 @@ export function EmbedConfigInputs({
</Select.Content> </Select.Content>
</Select.Root> </Select.Root>
<Select.Root <Select.Root
size="1"
value={ value={
( (
state[ state[
@@ -234,7 +236,6 @@ export function EmbedConfigInputs({
</Select.Content> </Select.Content>
</Select.Root> </Select.Root>
<Select.Root <Select.Root
size="1"
value={ value={
( (
state[ state[
@@ -269,7 +270,6 @@ export function EmbedConfigInputs({
case EmbedConfigType.Number: { case EmbedConfigType.Number: {
control = ( control = (
<TextField.Root <TextField.Root
size="1"
style={{ width: 64 }} style={{ width: 64 }}
type="number" type="number"
value={state[key] as number} value={state[key] as number}
@@ -293,7 +293,6 @@ export function EmbedConfigInputs({
control = ( control = (
<TextField.Root <TextField.Root
placeholder="Empty" placeholder="Empty"
size="1"
style={{ width: 64 }} style={{ width: 64 }}
value={state[key] as string} value={state[key] as string}
onChange={(event) => { onChange={(event) => {
@@ -310,7 +309,6 @@ export function EmbedConfigInputs({
case EmbedConfigType.Size: { case EmbedConfigType.Size: {
control = ( control = (
<Select.Root <Select.Root
size="1"
value={state[key] as RadixSize} value={state[key] as RadixSize}
onValueChange={(value) => { onValueChange={(value) => {
mutateState((draft) => { mutateState((draft) => {
@@ -337,7 +335,6 @@ export function EmbedConfigInputs({
case EmbedConfigType.Radius: { case EmbedConfigType.Radius: {
control = ( control = (
<Select.Root <Select.Root
size="1"
value={state[key] as RadixRadius} value={state[key] as RadixRadius}
onValueChange={(value) => { onValueChange={(value) => {
mutateState((draft) => { mutateState((draft) => {
@@ -363,7 +360,6 @@ export function EmbedConfigInputs({
control = ( control = (
<> <>
<Select.Root <Select.Root
size="1"
value={(state[key] as RadixColor).base} value={(state[key] as RadixColor).base}
onValueChange={(value) => { onValueChange={(value) => {
mutateState((draft) => { mutateState((draft) => {
@@ -403,7 +399,6 @@ export function EmbedConfigInputs({
</Select.Root> </Select.Root>
<Select.Root <Select.Root
size="1"
value={(state[key] as RadixColor).variant} value={(state[key] as RadixColor).variant}
onValueChange={(value) => { onValueChange={(value) => {
mutateState((draft) => { mutateState((draft) => {
@@ -477,7 +472,6 @@ export function EmbedConfigInputs({
case EmbedConfigType.TextColor: { case EmbedConfigType.TextColor: {
control = ( control = (
<Select.Root <Select.Root
size="1"
value={`${state[key]}`} value={`${state[key]}`}
onValueChange={(value) => { onValueChange={(value) => {
mutateState((draft) => { mutateState((draft) => {
@@ -553,15 +547,14 @@ export function EmbedConfigInputs({
mb="1" mb="1"
pb={setting.pad ? '6' : undefined} pb={setting.pad ? '6' : undefined}
> >
<Text color="gray" size="2"> <Flex align="center" gap="4">
{capitalize(startCase(key))} <Text>{capitalize(startCase(key))}</Text>
</Text>
<Separator style={{ flex: 1 }} />
</Flex>
{control && <Flex gap="1">{control}</Flex>} {control && <Flex gap="1">{control}</Flex>}
{!control && ( {!control && <Text color="red">Immutable</Text>}
<Text color="red" size="1">
Immutable
</Text>
)}
</Flex> </Flex>
); );
})} })}