Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
373 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tldraw/apps/tldraw-logseq/src/components/inputs/SelectInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from 'react' | ||
|
||
interface ColorInputProps extends React.InputHTMLAttributes<HTMLInputElement> { | ||
label: string | ||
} | ||
|
||
export function ColorInput({ label, ...rest }: ColorInputProps) { | ||
return ( | ||
<div className="input"> | ||
<label htmlFor={`color-${label}`}>{label}</label> | ||
<div className="color-input-wrapper"> | ||
<input className="color-input" name={`color-${label}`} type="color" {...rest} /> | ||
</div> | ||
</div> | ||
) | ||
} |
21 changes: 21 additions & 0 deletions
21
tldraw/apps/tldraw-logseq/src/components/inputs/SwitchInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as React from 'react' | ||
import * as Switch from '@radix-ui/react-switch' | ||
interface SwitchInputProps extends React.InputHTMLAttributes<HTMLInputElement> { | ||
label: string | ||
onCheckedChange: (checked: boolean) => void | ||
} | ||
|
||
export function SwitchInput({ label, ...rest }: SwitchInputProps) { | ||
return ( | ||
<div className="input"> | ||
<label htmlFor={`switch-${label}`}>{label}</label> | ||
<Switch.Root | ||
className="switch-input-root" | ||
checked={rest.checked} | ||
onCheckedChange={rest.onCheckedChange} | ||
> | ||
<Switch.Thumb className="switch-input-thumb" /> | ||
</Switch.Root> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
// export * as shapes from '~lib/shapes' | ||
// export * as tools from '~lib/tools' | ||
// export { AppUI } from '~components/AppUI' | ||
// export { ContextBar } from '~components/ContextBar/ContextBar' | ||
// export { AppCanvas, AppProvider } from '@tldraw/react' | ||
// export { useFileDrop } from '~hooks/useFileDrop' | ||
|
||
export * from './app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.