diff --git a/components/common/PopoverContent/index.module.scss b/components/common/PopoverContent/index.module.scss index 31fd8e86..8a8926e2 100644 --- a/components/common/PopoverContent/index.module.scss +++ b/components/common/PopoverContent/index.module.scss @@ -1,3 +1,59 @@ +.popover { + animation: scaleIn $duration-zoom ease-out; + background: var(--dialog-bg); + border-radius: $card-corner; + border: 0.5px solid rgba(0, 0, 0, 0.18); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24); + outline: none; + padding: $unit; + transform-origin: var(--radix-popover-content-transform-origin); + width: var(--radix-popover-trigger-width); + z-index: 5; + + @include breakpoint(phone) { + min-width: auto; + } + + &.raid { + width: auto; + } + + &.flush { + padding: 0; + } +} + +.jobAccessory { + padding: $unit-2x; + min-width: 40vw; + max-width: 40vw; + max-height: 40vh; + overflow-y: auto; + overflow-x: none; + margin-left: $unit-2x; + + h3 { + font-size: $font-regular; + font-weight: $medium; + margin: 0 0 $unit $unit; + } + + &.readOnly { + min-width: inherit; + max-width: inherit; + } + + @include breakpoint(tablet) { + width: initial; + max-width: initial; + } + + @include breakpoint(phone) { + width: initial; + max-width: initial; + } +} + .arrow { fill: var(--dialog-bg); filter: drop-shadow(0px 1px 1px rgb(0 0 0 / 0.18)); diff --git a/components/common/PopoverContent/index.tsx b/components/common/PopoverContent/index.tsx index 1ccc1c68..b3cb2a8c 100644 --- a/components/common/PopoverContent/index.tsx +++ b/components/common/PopoverContent/index.tsx @@ -20,9 +20,13 @@ export const PopoverContent = React.forwardRef( { children, ...props }: PropsWithChildren, forwardedRef ) { - const classes = classnames(props.className, { - Popover: true, - }) + const classes = classnames( + { + [styles.popover]: true, + }, + props.className?.split(' ').map((a) => styles[a]) + ) + return ( diff --git a/components/job/JobAccessoryItem/index.module.scss b/components/job/JobAccessoryItem/index.module.scss index 1c255ada..8452bb7a 100644 --- a/components/job/JobAccessoryItem/index.module.scss +++ b/components/job/JobAccessoryItem/index.module.scss @@ -1,4 +1,4 @@ -.JobAccessoryItem { +.item { background: none; border-radius: $input-corner; border: none; diff --git a/components/job/JobAccessoryItem/index.tsx b/components/job/JobAccessoryItem/index.tsx index 9b7ccf9d..954d5825 100644 --- a/components/job/JobAccessoryItem/index.tsx +++ b/components/job/JobAccessoryItem/index.tsx @@ -18,7 +18,7 @@ const JobAccessoryItem = ({ accessory, selected }: Props) => { return ( diff --git a/components/job/JobAccessoryPopover/index.module.scss b/components/job/JobAccessoryPopover/index.module.scss index 88ac72d4..2c1389bc 100644 --- a/components/job/JobAccessoryPopover/index.module.scss +++ b/components/job/JobAccessoryPopover/index.module.scss @@ -1,67 +1,37 @@ -.JobAccessory.Popover { - padding: $unit-2x; - min-width: 40vw; - max-width: 40vw; - max-height: 40vh; - overflow-y: scroll; - margin-left: $unit-2x; - - h3 { - font-size: $font-regular; - font-weight: $medium; - margin: 0 0 $unit $unit; - } - - &.ReadOnly { - min-width: inherit; - max-width: inherit; - } +.accessories { + display: grid; + gap: $unit; + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); @include breakpoint(tablet) { - width: initial; - max-width: initial; + grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); + gap: 0; + } +} + +.equippedAccessory { + display: flex; + flex-direction: column; + gap: $unit-2x; + + h3 { + margin: 0; } - @include breakpoint(phone) { - width: initial; - max-width: initial; - } - - .Accessories { - display: grid; - gap: $unit; - grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); - - @include breakpoint(tablet) { - grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); - gap: 0; - } - } - - .EquippedAccessory { + .accessory { display: flex; flex-direction: column; - gap: $unit-2x; + gap: $unit; - h3 { - margin: 0; + h4 { + font-size: $font-small; + font-weight: $medium; + text-align: center; } - .Accessory { - display: flex; - flex-direction: column; - gap: $unit; - - h4 { - font-size: $font-small; - font-weight: $medium; - text-align: center; - } - - img { - border-radius: $item-corner; - width: 150px; - } + img { + border-radius: $item-corner; + width: 150px; } } } diff --git a/components/job/JobAccessoryPopover/index.tsx b/components/job/JobAccessoryPopover/index.tsx index 6986de4f..26c831c0 100644 --- a/components/job/JobAccessoryPopover/index.tsx +++ b/components/job/JobAccessoryPopover/index.tsx @@ -49,8 +49,8 @@ const JobAccessoryPopover = ({ const [open, setOpen] = useState(false) const classes = classNames({ - JobAccessory: true, - ReadOnly: !editable, + jobAccessory: true, + readOnly: !editable, }) // Hooks @@ -91,7 +91,7 @@ const JobAccessoryPopover = ({ )} {accessories.map((accessory) => ( @@ -110,14 +110,14 @@ const JobAccessoryPopover = ({ ) const readOnly = currentAccessory ? ( -
+

{t('equipped')}{' '} {job.accessory_type === 1 ? `${t('accessories.paladin')}s` : t('accessories.manadiver')}

-
+