set
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { detectFormat } from "@/utils/file-detector";
|
||||
import { useTheme } from "@/context/ThemeContext";
|
||||
|
||||
type FilePickerProps = {
|
||||
value: string;
|
||||
@@ -6,6 +7,7 @@ type FilePickerProps = {
|
||||
};
|
||||
|
||||
export function FilePicker(props: FilePickerProps) {
|
||||
const { theme } = useTheme();
|
||||
const format = detectFormat(props.value);
|
||||
|
||||
return (
|
||||
@@ -16,7 +18,7 @@ export function FilePicker(props: FilePickerProps) {
|
||||
placeholder="/path/to/sync-file.json"
|
||||
style={{ width: 40 }}
|
||||
/>
|
||||
<text>Format: {format}</text>
|
||||
<text fg={theme.text}>Format: {format}</text>
|
||||
</box>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user