-
Notifications
You must be signed in to change notification settings - Fork 557
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
1 parent
7d4451a
commit bb14ff5
Showing
9 changed files
with
115 additions
and
31 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
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
42 changes: 40 additions & 2 deletions
42
app/packages/core/src/components/Filters/NumericFieldFilter/Boxes.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 |
---|---|---|
@@ -1,7 +1,45 @@ | ||
import { Selector, useTheme } from "@fiftyone/components"; | ||
import { pathColor } from "@fiftyone/state"; | ||
import React from "react"; | ||
import { useRecoilValue } from "recoil"; | ||
import styled from "styled-components"; | ||
|
||
const Boxes = () => { | ||
return <>Boxes</>; | ||
const Container = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
column-gap: 1rem; | ||
background: ${({ theme }) => theme.background.level2}; | ||
border: 1px solid var(--fo-palette-divider); | ||
border-radius: 2px; | ||
color: ${({ theme }) => theme.text.secondary}; | ||
margin-top: 0.25rem; | ||
padding: 0.25rem 0.5rem; | ||
`; | ||
|
||
const Box = ({ path, placeholder }: { path: string; placeholder: string }) => { | ||
const color = useRecoilValue(pathColor(path)); | ||
const theme = useTheme(); | ||
return ( | ||
<Selector | ||
placeholder={placeholder} | ||
inputStyle={{ | ||
color: theme.text.secondary, | ||
fontSize: "1rem", | ||
width: "100%", | ||
}} | ||
onSelect={() => alert("E")} | ||
containerStyle={{ borderBottomColor: color, zIndex: 1000 }} | ||
/> | ||
); | ||
}; | ||
|
||
const Boxes = ({ path }: { path: string }) => { | ||
return ( | ||
<Container> | ||
<Box path={path} placeholder={"min"} /> | ||
<Box path={path} placeholder={"max"} /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Boxes; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./components"; | ||
export * from "./plugins"; | ||
export * from "./hooks"; | ||
export * from "./plugins"; | ||
export * from "./utils/links"; |
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