Merged in fix/BOOK-61-update-chip (pull request #3041)
fix(BOOK-61): update chip * fix(BOOK-61): update chip * fix(BOOK-61): revert chip changes Approved-by: Erik Tiekstra
This commit is contained in:
@@ -6,10 +6,9 @@ import { RateEnum } from "@scandic-hotels/common/constants/rate"
|
|||||||
import { logger } from "@scandic-hotels/common/logger"
|
import { logger } from "@scandic-hotels/common/logger"
|
||||||
import Body from "@scandic-hotels/design-system/Body"
|
import Body from "@scandic-hotels/design-system/Body"
|
||||||
import Caption from "@scandic-hotels/design-system/Caption"
|
import Caption from "@scandic-hotels/design-system/Caption"
|
||||||
import Chip from "@scandic-hotels/design-system/Chip"
|
import { ChipButton } from "@scandic-hotels/design-system/ChipButton"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
|
||||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||||
|
|
||||||
import { useSelectRateContext } from "../../../../../../contexts/SelectRate/SelectRateContext"
|
import { useSelectRateContext } from "../../../../../../contexts/SelectRate/SelectRateContext"
|
||||||
@@ -80,19 +79,17 @@ export function SelectedRoomPanel({ roomIndex }: { roomIndex: number }) {
|
|||||||
) : null}
|
) : null}
|
||||||
{showModifyButton && (
|
{showModifyButton && (
|
||||||
<div className={styles.modifyButtonContainer}>
|
<div className={styles.modifyButtonContainer}>
|
||||||
<Button clean onClick={() => setActiveRoom(roomIndex)}>
|
<ChipButton
|
||||||
<Chip size="small" variant="uiTextHighContrast">
|
size="Medium"
|
||||||
<MaterialIcon
|
onClick={() => setActiveRoom(roomIndex)}
|
||||||
size={16}
|
variant="Outlined"
|
||||||
color="Icon/Inverted"
|
>
|
||||||
icon="edit_square"
|
|
||||||
/>
|
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.change",
|
id: "common.change",
|
||||||
defaultMessage: "Change",
|
defaultMessage: "Change",
|
||||||
})}
|
})}
|
||||||
</Chip>
|
<MaterialIcon size={20} color="CurrentColor" icon="edit_square" />
|
||||||
</Button>
|
</ChipButton>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
import { Typography } from '../Typography'
|
|
||||||
|
|
||||||
import { VariantProps } from 'class-variance-authority'
|
import { VariantProps } from 'class-variance-authority'
|
||||||
import { chipVariants } from './variants'
|
import { chipVariants } from './variants'
|
||||||
|
import Footnote from '../Footnote'
|
||||||
|
|
||||||
export interface ChipProps
|
export interface ChipProps
|
||||||
extends React.HtmlHTMLAttributes<HTMLDivElement>,
|
extends React.HtmlHTMLAttributes<HTMLDivElement>,
|
||||||
VariantProps<typeof chipVariants> {}
|
VariantProps<typeof chipVariants> {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Do not use
|
||||||
|
*/
|
||||||
|
|
||||||
export default function Chip({
|
export default function Chip({
|
||||||
children,
|
children,
|
||||||
className,
|
className,
|
||||||
@@ -19,8 +22,8 @@ export default function Chip({
|
|||||||
variant,
|
variant,
|
||||||
})
|
})
|
||||||
return (
|
return (
|
||||||
<Typography variant="Tag/sm">
|
<Footnote asChild>
|
||||||
<span className={classNames}>{children}</span>
|
<div className={classNames}>{children}</div>
|
||||||
</Typography>
|
</Footnote>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.chip {
|
.chip {
|
||||||
background-color: var(--Component-Button-Inverted-Fill-Default);
|
background-color: var(--Component-Button-Inverted-Fill-Default);
|
||||||
border-radius: var(--Corner-radius-sm);
|
border-radius: var(--Corner-radius-sm);
|
||||||
padding: var(--Space-x1) var(--Space-x15);
|
padding: 6px var(--Space-x15);
|
||||||
color: var(--Text-Interactive-Default);
|
color: var(--Text-Interactive-Default);
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user