feat: start of buttons

This commit is contained in:
TrèsAbhi committed 2024-08-10 13:39:49 -05:00
1 parent 64139e301b
commit 31666c9bb6
7 files changed
+23 -2

No files matched your search

@@ -7,6 +7,7 @@ export function Boolean({ configKey }: EmbedPreviewControllerProps) {
return ( return (
<Switch <Switch
variant="soft"
checked={EmbedState.use((state) => state[configKey] as boolean)} checked={EmbedState.use((state) => state[configKey] as boolean)}
onCheckedChange={() => { onCheckedChange={() => {
mutateEmbedState((draft) => { mutateEmbedState((draft) => {
@@ -25,6 +25,7 @@ export function ColorControllerRaw({
}} }}
/> />
<Slider <Slider
variant="soft"
min={0} min={0}
max={255} max={255}
value={[alpha]} value={[alpha]}
@@ -7,6 +7,7 @@ export function Radius({ configKey }: EmbedPreviewControllerProps) {
return ( return (
<Slider <Slider
variant="soft"
min={0} min={0}
max={5} max={5}
value={[ value={[
@@ -7,6 +7,7 @@ export function Size({ configKey }: EmbedPreviewControllerProps) {
return ( return (
<Slider <Slider
variant="soft"
min={0} min={0}
max={9} max={9}
value={[ value={[
@@ -7,6 +7,7 @@ export function SizeWithout0({ configKey }: EmbedPreviewControllerProps) {
return ( return (
<Slider <Slider
variant="soft"
min={1} min={1}
max={9} max={9}
value={[ value={[
@@ -16,6 +16,7 @@ export function Slider({
return ( return (
<RadixSlider <RadixSlider
variant="soft"
min={config.min} min={config.min}
max={config.max} max={config.max}
value={[ value={[
+17 -2
View File
@@ -1,6 +1,6 @@
'use client'; 'use client';
import { ImageIcon } from '@radix-ui/react-icons'; import { CopyIcon, ImageIcon } from '@radix-ui/react-icons';
import { Box, Button, Flex, Heading, ScrollArea, Text } from '@radix-ui/themes'; import { Box, Button, Flex, Heading, ScrollArea, Text } from '@radix-ui/themes';
import { capitalize, startCase } from 'lodash'; import { capitalize, startCase } from 'lodash';
import { ReactNode, useEffect, useRef, useState } from 'react'; import { ReactNode, useEffect, useRef, useState } from 'react';
@@ -54,7 +54,22 @@ export default function Page({
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> <Heading>Customize</Heading>
<Flex mb="4" gap="2">
<Button
onClick={() => {
console.log(`${location.origin}/embed/${params.embed}/host`);
}}
>
<CopyIcon />
Copy URL
</Button>
<Button variant="outline">
<CopyIcon />
Copy CSS
</Button>
</Flex>
{Object.keys(config).map((configKey) => { {Object.keys(config).map((configKey) => {
const item = config[configKey]; const item = config[configKey];