diff --git a/README.md b/README.md
index 6f0fd3a..69904fd 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,10 @@
[](https://github.com/pluginsky/invert-color)
[](https://travis-ci.org/pluginsky/invert-color)
+
+
+
+
## About
Simply invert fills, strokes & effects colors in Figma
diff --git a/assets/.keep b/assets/.keep
new file mode 100644
index 0000000..e69de29
diff --git a/src/ui/components/Configurator/Configurator.module.scss b/src/ui/components/Configurator/Configurator.module.scss
index 7532d38..fa4014b 100644
--- a/src/ui/components/Configurator/Configurator.module.scss
+++ b/src/ui/components/Configurator/Configurator.module.scss
@@ -1,4 +1,5 @@
.configurator {
+ // TODO
margin-top: var(--size-xxsmall);
margin-bottom: var(--size-xsmall);
}
diff --git a/src/ui/components/Elements/Elements.module.scss b/src/ui/components/Elements/Elements.module.scss
index 1426c5d..695ef3f 100644
--- a/src/ui/components/Elements/Elements.module.scss
+++ b/src/ui/components/Elements/Elements.module.scss
@@ -1,7 +1,17 @@
.toolbar {
display: flex;
- margin: var(--size-xxsmall) 0 var(--size-xsmall);
+ background-color: var(--white);
+ padding: var(--size-xxsmall);
+ // margin-bottom: var(--size-xxsmall); // TODO
gap: var(--size-xxsmall);
+ border-bottom: 1px solid var(--silver);
+ z-index: 10;
+ position: sticky;
+ top: 0;
+}
+
+.elementsContent {
+ padding: 0 var(--size-xxsmall);
}
.search {
diff --git a/src/ui/components/Elements/Elements.tsx b/src/ui/components/Elements/Elements.tsx
index 891c3fe..438eb89 100644
--- a/src/ui/components/Elements/Elements.tsx
+++ b/src/ui/components/Elements/Elements.tsx
@@ -5,6 +5,7 @@ import { Configurator } from '../Configurator/Configurator';
import { availableOptions } from '../../../shared/constants/availableOptions';
import { prepareOptionName } from '../../utils/prepareOptionName';
import { MessageScreen } from '../MessageScreen/MessageScreen';
+import { useSearch } from '../../hooks/useSearch';
import type { Group } from '../../types/Group';
import styles from './Elements.module.scss';
@@ -16,7 +17,7 @@ const configuratorsEntries = Object.entries(
) as OptionsEntries[];
export const Elements = () => {
- const [searchValue, setSearchValue] = useState('');
+ const { searchValue, setSearchValue } = useSearch();
const [configurators, setConfigurators] = useState(configuratorsEntries);
@@ -34,6 +35,7 @@ export const Elements = () => {
}, [searchValue]);
return (
+ // TODO classnames
0 ? undefined : styles.fullLayout}>
{
/>
- {configurators.length > 0 ? (
- configurators.map(([group, options]) => (
-
- ))
- ) : (
-
- )}
+
+ {configurators.length > 0 ? (
+ configurators.map(([group, options]) => (
+
+ ))
+ ) : (
+
+ )}
+
);
};
diff --git a/src/ui/hooks/useSearch.ts b/src/ui/hooks/useSearch.ts
new file mode 100644
index 0000000..ae85797
--- /dev/null
+++ b/src/ui/hooks/useSearch.ts
@@ -0,0 +1,11 @@
+import create from 'zustand';
+
+type State = {
+ readonly searchValue: string;
+ setSearchValue: (searchValue: string) => void;
+};
+
+export const useSearch = create((set) => ({
+ searchValue: '',
+ setSearchValue: (searchValue) => set(() => ({ searchValue })),
+}));
diff --git a/src/ui/ui.module.scss b/src/ui/ui.module.scss
index f8a2a89..003de3d 100644
--- a/src/ui/ui.module.scss
+++ b/src/ui/ui.module.scss
@@ -6,6 +6,6 @@
.tabsContent {
flex: 1;
- padding: 0 var(--size-xxsmall);
+ // padding: 0 var(--size-xxsmall); // TODO
overflow: auto;
}