diff --git a/src/components/Legend/ScaleLegend/ScaleLegendDemo.tsx b/src/components/Legend/ScaleBar/ScaleBarDemo.tsx
similarity index 83%
rename from src/components/Legend/ScaleLegend/ScaleLegendDemo.tsx
rename to src/components/Legend/ScaleBar/ScaleBarDemo.tsx
index c139bce..eaa43ea 100644
--- a/src/components/Legend/ScaleLegend/ScaleLegendDemo.tsx
+++ b/src/components/Legend/ScaleBar/ScaleBarDemo.tsx
@@ -1,22 +1,22 @@
-import { ScaleLegend } from '../..'
+import { ScaleBar } from '../..'
-const ScaleLegendDemo = () => (
+const ScaleBarDemo = () => (
- 600K']}
isGradient
/>
-
-
- (
)
-export default ScaleLegendDemo
+export default ScaleBarDemo
diff --git a/src/components/Legend/ScaleLegend/index.tsx b/src/components/Legend/ScaleBar/index.tsx
similarity index 64%
rename from src/components/Legend/ScaleLegend/index.tsx
rename to src/components/Legend/ScaleBar/index.tsx
index 390e63c..703a1c4 100644
--- a/src/components/Legend/ScaleLegend/index.tsx
+++ b/src/components/Legend/ScaleBar/index.tsx
@@ -2,14 +2,14 @@
import React from 'react'
import {
- ScaleLegendGradientBar,
- ScaleLegendContainer,
- ScaleLegendLabelContainer,
- ScaleLegendSubLabels,
- ScaleLegendValue,
- ScaleLegendBar,
+ ScaleBarGradientBar,
+ ScaleBarContainer,
+ ScaleBarLabelContainer,
+ ScaleBarSubLabels,
+ ScaleBarValue,
+ ScaleBarBar,
} from './styled'
-import { ScaleLegendProps } from './types'
+import { ScaleBarProps } from './types'
const generateGradient = (colors: string[]) => {
const percentages = colors.map((_, index) => {
@@ -20,26 +20,26 @@ const generateGradient = (colors: string[]) => {
return `linear-gradient(to right, ${colors.map((color, index) => `${color} ${percentages[index]}`).join(', ')})`
}
-const ScaleLegend = ({
+const ScaleBar = ({
colors,
values,
subLabels,
isGradient,
-}: ScaleLegendProps) => (
-
+}: ScaleBarProps) => (
+
{isGradient ? (
-
+
) : (
-
+
{colors?.map((color, idx) => (
))}
-
+
)}
-
+
{values?.map((value) => (
- {value}
+ {value}
))}
-
+
{subLabels && subLabels.length ? (
-
+
{subLabels.map((subLabel) => (
-
+
{subLabel}
-
+
))}
-
+
) : null}
-
+
)
-export default ScaleLegend
+export default ScaleBar
diff --git a/src/components/Legend/ScaleLegend/styled.ts b/src/components/Legend/ScaleBar/styled.ts
similarity index 78%
rename from src/components/Legend/ScaleLegend/styled.ts
rename to src/components/Legend/ScaleBar/styled.ts
index 1942f57..b828375 100644
--- a/src/components/Legend/ScaleLegend/styled.ts
+++ b/src/components/Legend/ScaleBar/styled.ts
@@ -1,14 +1,14 @@
import styled from '@emotion/styled'
import { getThemedColor } from '../../../lib/theme'
-export const ScaleLegendContainer = styled.div`
+export const ScaleBarContainer = styled.div`
width: 100%;
display: flex;
flex-direction: column;
margin-bottom: 16px;
`
-export const ScaleLegendGradientBar = styled.div<{ gradient: string }>`
+export const ScaleBarGradientBar = styled.div<{ gradient: string }>`
height: 20px;
width: 100%;
margin-bottom: 8px;
@@ -17,7 +17,7 @@ export const ScaleLegendGradientBar = styled.div<{ gradient: string }>`
${({ gradient }) => (gradient ? `background: ${gradient};` : '')}
`
-export const ScaleLegendBar = styled.div`
+export const ScaleBarBar = styled.div`
height: 20px;
width: 100%;
margin-bottom: 8px;
@@ -37,13 +37,13 @@ export const ScaleLegendBar = styled.div`
}
`
-export const ScaleLegendLabelContainer = styled.div`
+export const ScaleBarLabelContainer = styled.div`
display: flex;
justify-content: space-between;
align-items: flex-start;
`
-export const ScaleLegendValue = styled.p`
+export const ScaleBarValue = styled.p`
width: 100%;
font-size: 12px;
line-height: 16px;
@@ -52,7 +52,7 @@ export const ScaleLegendValue = styled.p`
text-align: center;
`
-export const ScaleLegendSubLabels = styled.p`
+export const ScaleBarSubLabels = styled.p`
font-size: 12px;
line-height: 16px;
font-weight: 400;
diff --git a/src/components/Legend/ScaleLegend/types.ts b/src/components/Legend/ScaleBar/types.ts
similarity index 72%
rename from src/components/Legend/ScaleLegend/types.ts
rename to src/components/Legend/ScaleBar/types.ts
index 091f5a1..0242fc4 100644
--- a/src/components/Legend/ScaleLegend/types.ts
+++ b/src/components/Legend/ScaleBar/types.ts
@@ -1,4 +1,4 @@
-export type ScaleLegendProps = {
+export type ScaleBarProps = {
colors: string[]
values: string[]
subLabels?: string[]
diff --git a/src/components/NavigationRail/NavigationRail.stories.tsx b/src/components/NavigationRail/NavigationRail.stories.tsx
index e040da9..4d21edf 100644
--- a/src/components/NavigationRail/NavigationRail.stories.tsx
+++ b/src/components/NavigationRail/NavigationRail.stories.tsx
@@ -7,7 +7,7 @@ import NavigationRail from '.'
import { CheckIcon } from '../icons'
const meta = {
- title: 'Navigation Rail',
+ title: 'Navigation/Navigation Rail',
component: NavigationRail,
parameters: {
layout: 'fullscreen',
diff --git a/src/components/Radio/Radio.stories.tsx b/src/components/Radio/Radio.stories.tsx
index 5b97b3e..1d96e17 100644
--- a/src/components/Radio/Radio.stories.tsx
+++ b/src/components/Radio/Radio.stories.tsx
@@ -7,7 +7,7 @@ import Radio from '.'
import RadioGroup from './RadioGroup'
const meta = {
- title: 'Controls/Radio Button',
+ title: 'Forms/Controls/Radio Button',
component: RadioGroup,
parameters: {
layout: 'centered',
diff --git a/src/components/Slider/Slider.stories.tsx b/src/components/Slider/Slider.stories.tsx
index 703f770..eb33605 100644
--- a/src/components/Slider/Slider.stories.tsx
+++ b/src/components/Slider/Slider.stories.tsx
@@ -5,7 +5,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import Slider from '.'
const meta = {
- title: 'Slider',
+ title: 'Forms/Controls/Slider',
component: Slider,
parameters: {
layout: 'centered',
diff --git a/src/components/Switch/Switch.stories.ts b/src/components/Switch/Switch.stories.ts
index 6426290..aee1b54 100644
--- a/src/components/Switch/Switch.stories.ts
+++ b/src/components/Switch/Switch.stories.ts
@@ -3,7 +3,7 @@ import { fn } from '@storybook/test'
import Switch from '.'
const meta = {
- title: 'Controls/Switch',
+ title: 'Forms/Controls/Switch',
component: Switch,
parameters: {
layout: 'centered',
diff --git a/src/components/TabBar/TabBar.stories.tsx b/src/components/TabBar/TabBar.stories.tsx
index 6071b0d..494adcb 100644
--- a/src/components/TabBar/TabBar.stories.tsx
+++ b/src/components/TabBar/TabBar.stories.tsx
@@ -6,7 +6,7 @@ import TabBar from '.'
import { CheckIcon } from '../icons'
const meta = {
- title: 'Tab Bar',
+ title: 'Navigation/Tab Bar',
component: TabBar,
parameters: {
layout: 'centered',
diff --git a/src/components/Tag/Tag.stories.tsx b/src/components/Tag/Tag.stories.tsx
index 0f3b40b..70aa84e 100644
--- a/src/components/Tag/Tag.stories.tsx
+++ b/src/components/Tag/Tag.stories.tsx
@@ -7,7 +7,7 @@ import Tag from '.'
import { InfoIcon } from '../icons'
const meta = {
- title: 'Tag',
+ title: 'Forms/Tag',
component: Tag,
parameters: {
layout: 'centered',
diff --git a/src/components/TextInput/TextInput.stories.tsx b/src/components/TextInput/TextInput.stories.tsx
index 0add003..26750db 100644
--- a/src/components/TextInput/TextInput.stories.tsx
+++ b/src/components/TextInput/TextInput.stories.tsx
@@ -5,7 +5,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import TextInput from '.'
const meta = {
- title: 'Inputs/Text Input',
+ title: 'Forms/Inputs/Text Input',
component: TextInput,
parameters: {
layout: 'centered',
diff --git a/src/components/Textarea/Textarea.stories.tsx b/src/components/Textarea/Textarea.stories.tsx
index fa2eed1..00bb980 100644
--- a/src/components/Textarea/Textarea.stories.tsx
+++ b/src/components/Textarea/Textarea.stories.tsx
@@ -5,7 +5,7 @@ import type { Meta, StoryObj } from '@storybook/react'
import Textarea from '.'
const meta = {
- title: 'Inputs/Text Area',
+ title: 'Forms/Inputs/Text Area',
component: Textarea,
parameters: {
layout: 'centered',
diff --git a/src/components/index.ts b/src/components/index.ts
index 9ab18ef..a7a8dcf 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -18,6 +18,6 @@ export { default as IconButton } from './Buttons/IconButton'
export { default as Slider } from './Slider'
export { default as QualitativeLegend } from './Legend/QualitativeLegend'
export { default as LayerParameters } from './Legend/LayerParameters'
-export { default as ScaleLegend } from './Legend/ScaleLegend'
+export { default as ScaleBar } from './Legend/ScaleBar'
export { default as LegendItem } from './Legend/LegendItem'
export { default as LegendPanel } from './Legend/LegendPanel'