Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: center empty state text #108

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/empty-state/d-empty-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export class DEmptyState {
<div>
<slot />
</div>
<div class="flex flex-col gap-1">
<d-heading size="s">{this.heading}</d-heading>
<d-text size="l" class="">
<div class="flex flex-col gap-1 items-center">
<d-heading size="s" class="text-center">{this.heading}</d-heading>
<d-text size="l" class="text-center">
{this.text}
</d-text>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/empty-state/empty-state.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DEmptyState } from './d-empty-state';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Molecules/EmptyState',
title: 'Design System/Molecule/EmptyState',
render: args =>
`<d-empty-state
heading="${args.heading}"
Expand Down
10 changes: 5 additions & 5 deletions src/components/empty-state/test/d-empty-state.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ describe('d-empty-state', () => {
<div>
<slot></slot>
</div>
<div class="flex flex-col gap-1">
<d-heading size="s"></d-heading>
<d-text size="l"></d-text>
</div>
</div>
<div class="flex flex-col gap-1 items-center">
<d-heading class="text-center" size="s"></d-heading>
<d-text class="text-center" size="l"></d-text>
</div>
</div>
</mock:shadow-root>
</d-empty-state>
`);
Expand Down
2 changes: 0 additions & 2 deletions src/components/heading/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

- [d-credential-card](../credential-card)
- [d-empty-state](../empty-state)
- [d-header](../header)
- [d-logo](../logo)
- [d-page-description](../page-description)
- [d-session-card](../session-card)
Expand All @@ -29,7 +28,6 @@
graph TD;
d-credential-card --> d-heading
d-empty-state --> d-heading
d-header --> d-heading
d-logo --> d-heading
d-page-description --> d-heading
d-session-card --> d-heading
Expand Down
Loading