diff --git a/components/common/Segment/index.scss b/components/common/Segment/index.scss index fa148d4e..cb0aa7e8 100644 --- a/components/common/Segment/index.scss +++ b/components/common/Segment/index.scss @@ -1,6 +1,7 @@ .Segment { color: $grey-55; cursor: pointer; + flex-grow: 1; font-size: 1.4rem; font-weight: $normal; min-width: 100px; diff --git a/components/common/SegmentedControl/index.scss b/components/common/SegmentedControl/index.scss index 5866f6ad..f62e146b 100644 --- a/components/common/SegmentedControl/index.scss +++ b/components/common/SegmentedControl/index.scss @@ -16,6 +16,15 @@ background: var(--card-bg); } + &.Blended { + background: var(--input-bound-bg); + border-radius: $full-corner; + + .Segment input:checked + label { + background: var(--card-bg); + } + } + &.fire { .Segment input:checked + label { background: var(--fire-bg); diff --git a/components/common/SegmentedControl/index.tsx b/components/common/SegmentedControl/index.tsx index 379f18d2..6e82351b 100644 --- a/components/common/SegmentedControl/index.tsx +++ b/components/common/SegmentedControl/index.tsx @@ -1,19 +1,36 @@ import React from 'react' - +import classNames from 'classnames' import './index.scss' interface Props { + className?: string elementClass?: string + blended?: boolean } -const SegmentedControl: React.FC = ({ elementClass, children }) => { +const SegmentedControl: React.FC = ({ + className, + elementClass, + blended, + children, +}) => { + const classes = classNames( + { + SegmentedControl: true, + Blended: blended, + }, + className, + elementClass + ) return (
-
- {children} -
+
{children}
) } +SegmentedControl.defaultProps = { + blended: false, +} + export default SegmentedControl