mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
highlight segment buttons
This commit is contained in:
1 parent
edb08c5240
commit
f00c48417d
4 files changed
+21
-5
No files matched your search
@@ -37,6 +37,15 @@
|
||||
&:hover {
|
||||
background-color: $secondary-very-light !important;
|
||||
}
|
||||
|
||||
&.fy-highlighted-segment {
|
||||
background-color: rgba($primary, 80%);
|
||||
color: $white;
|
||||
|
||||
&:hover {
|
||||
background-color: rgba($primary, 80%) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
@@ -13,6 +13,7 @@ interface Props {
|
||||
value?: string | number;
|
||||
icon?: IconDefinition | undefined;
|
||||
disabled?: boolean;
|
||||
highlight?: boolean;
|
||||
}
|
||||
|
||||
export default function SegmentButtons({
|
||||
@@ -24,6 +25,7 @@ export default function SegmentButtons({
|
||||
options = [],
|
||||
value: inValue = "",
|
||||
disabled = false,
|
||||
highlight = false,
|
||||
}: Props) {
|
||||
// const onClick = ({ target }: any) => onChange();
|
||||
return (
|
||||
@@ -37,9 +39,13 @@ export default function SegmentButtons({
|
||||
) => (
|
||||
<li
|
||||
{...{
|
||||
className: `${value === inValue ? "fy-selected-segment" : ""} ${
|
||||
disabled ? "fy-disabled-segment" : ""
|
||||
}`.trim(),
|
||||
className: `${
|
||||
value === inValue
|
||||
? `fy-selected-segment ${
|
||||
highlight && "fy-highlighted-segment"
|
||||
}`.trim()
|
||||
: ""
|
||||
} ${disabled ? "fy-disabled-segment" : ""}`.trim(),
|
||||
key,
|
||||
onClick: ({ target }: any) =>
|
||||
onChange({ target: { name, type: "option", value } }),
|
||||
|
||||
+2
-2
@@ -108,8 +108,8 @@
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 6px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
box-shadow:
|
||||
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
||||
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
||||
|
||||
@@ -377,6 +377,7 @@ export default function StyleVideo() {
|
||||
},
|
||||
options: lengthOptions,
|
||||
value: length,
|
||||
highlight: true,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user