Skip to content

Commit

Permalink
refactor(Page Title): use CSS logical properties instead of physical …
Browse files Browse the repository at this point in the history
…values
  • Loading branch information
Cata1989 committed Jul 1, 2024
1 parent e31a68a commit 9346d25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Template = (args: Args) => {
const customDivider = args.customDivider
? html`<bq-divider
slot="divider"
class="mb-m block"
class="block m-be-m"
stroke-color="stroke--secondary"
stroke-thickness="1"
dashed
Expand Down Expand Up @@ -94,8 +94,8 @@ export const TitleBackActions: Story = {
title: 'Title',
'sub-title': 'Sub-title',
actions: html`
<bq-icon class="p-xs2" color="text--brand" name="pencil-simple" weight="bold"></bq-icon>
<bq-icon class="p-xs2" color="text--brand" name="download-simple" weight="bold"></bq-icon>
<bq-icon class="p-b-xs2 p-i-xs2" color="text--brand" name="pencil-simple" weight="bold"></bq-icon>
<bq-icon class="p-b-xs2 p-i-xs2" color="text--brand" name="download-simple" weight="bold"></bq-icon>
`,
'custom-style': true,
},
Expand All @@ -109,8 +109,8 @@ export const TitleBackActionsCustomDefault: Story = {
title: 'Title',
'sub-title': 'Sub-title',
actions: html`
<bq-icon class="p-xs2" color="text--brand" name="pencil-simple" weight="bold"></bq-icon>
<bq-icon class="p-xs2" color="text--brand" name="download-simple" weight="bold"></bq-icon>
<bq-icon class="p-b-xs2 p-i-xs2" color="text--brand" name="pencil-simple" weight="bold"></bq-icon>
<bq-icon class="p-b-xs2 p-i-xs2" color="text--brand" name="download-simple" weight="bold"></bq-icon>
`,
},
};
Expand All @@ -124,8 +124,8 @@ export const TitleBackActionsCustom: Story = {
title: 'Title',
'sub-title': 'Sub-title',
actions: html`
<bq-icon class="p-xs2" color="text--brand" name="pencil-simple" weight="bold"></bq-icon>
<bq-icon class="p-xs2" color="text--brand" name="download-simple" weight="bold"></bq-icon>
<bq-icon class="p-b-xs2 p-i-xs2" color="text--brand" name="pencil-simple" weight="bold"></bq-icon>
<bq-icon class="p-b-xs2 p-i-xs2" color="text--brand" name="download-simple" weight="bold"></bq-icon>
`,
'custom-style': true,
},
Expand Down
6 changes: 3 additions & 3 deletions packages/beeq/src/components/page-title/bq-page-title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class BqPageTitle {
render() {
return (
<div class="flex flex-col" part="wrapper">
<div class="flex gap-xs [padding-block:--paddingY]" part="base">
<div class="flex gap-xs p-b-[--paddingY]" part="base">
{/* Back navigation button */}
<div
class={{ flex: true, '!hidden': !this.haveBackNavigation }}
Expand All @@ -101,7 +101,7 @@ export class BqPageTitle {
</h1>
{/* Suffix */}
<div
class={{ 'flex flex-grow gap-xs p-xs2': true, '!hidden': !this.hasSuffix }}
class={{ 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }}
ref={(divElem) => (this.suffixElem = divElem)}
part="suffix"
>
Expand All @@ -125,7 +125,7 @@ export class BqPageTitle {
{/* Divider */}
<div part="divider">
<slot name="divider">
<bq-divider class="mb-m block" stroke-color="ui--secondary" stroke-thickness="1" />
<bq-divider class="block m-be-m" stroke-color="ui--secondary" stroke-thickness="1" />
</slot>
</div>
</div>
Expand Down

0 comments on commit 9346d25

Please sign in to comment.