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

Align card button right #11

Merged
merged 5 commits into from
Feb 19, 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
2 changes: 1 addition & 1 deletion .bitmap
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"card": {
"name": "card",
"scope": "bit-examples.github-ci",
"version": "0.0.4",
"version": "aeb07996faa7d9df99c9f509949e8eff53732dee",
"mainFile": "index.ts",
"rootDir": "github-ci/card"
},
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bit-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CLOUD_ACCESS_TOKEN: ${{ secrets.BIT_CLOUD_ACCESS_TOKEN }}
BIT_CONFIG_ACCESS_TOKEN: ${{ secrets.BIT_CONFIG_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -18,4 +18,4 @@ jobs:
run: |
npm config set '@bit:registry' https://node-registry.bit.cloud
npm config set '@teambit:registry' https://node-registry.bit.cloud
npm config set //node-registry.bit.cloud/:_authToken ${{ env.BIT_CLOUD_ACCESS_TOKEN }}
npm config set //node-registry.bit.cloud/:_authToken ${{ env.BIT_CONFIG_ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/commit-bitmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CLOUD_ACCESS_TOKEN: ${{ secrets.BIT_CLOUD_ACCESS_TOKEN }}
BIT_CONFIG_ACCESS_TOKEN: ${{ secrets.BIT_CONFIG_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lane-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CLOUD_ACCESS_TOKEN: ${{ secrets.BIT_CLOUD_ACCESS_TOKEN }}
BIT_CONFIG_ACCESS_TOKEN: ${{ secrets.BIT_CONFIG_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize Bit
uses: bit-tasks/init@v1
uses: bit-tasks/init@v1
- name: Bit Lane Cleanup
uses: bit-tasks/lane-cleanup@v1
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CLOUD_ACCESS_TOKEN: ${{ secrets.BIT_CLOUD_ACCESS_TOKEN }}
BIT_CONFIG_ACCESS_TOKEN: ${{ secrets.BIT_CONFIG_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize Bit
uses: bit-tasks/init@v1
uses: bit-tasks/init@v1
- name: Bit Pull Request
uses: bit-tasks/pull-request@v1
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CLOUD_ACCESS_TOKEN: ${{ secrets.BIT_CLOUD_ACCESS_TOKEN }}
BIT_CONFIG_ACCESS_TOKEN: ${{ secrets.BIT_CONFIG_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion github-ci/card/card.composition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Card } from './card';
export const BasicCard = () => {
return (
<div style={{ margin: '2em' }}>
<Card>hello world!</Card>
<Card>This is a card</Card>
</div>
);
};
Expand Down
16 changes: 13 additions & 3 deletions github-ci/card/card.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@

.card .footer {
display: flex;
justify-content: center;
align-items: center;
padding: 0 16px;
padding: 8px;
}

.card.sm {
Expand All @@ -39,3 +37,15 @@
height: 400px;
width: 400px;
}

.card .footerSlot {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
}

.card .buttonSlot {
display: flex;
justify-content: end;
}
2 changes: 1 addition & 1 deletion github-ci/card/card.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { BasicCard } from './card.composition';

it('renders with the correct text', () => {
const { getByText } = render(<BasicCard />);
const rendered = getByText('hello world!');
const rendered = getByText('This is a card');
expect(rendered).toBeTruthy();
});
5 changes: 4 additions & 1 deletion github-ci/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export function Card({ children, footerButton, size = 'md' }: CardProps) {
return (
<div className={cardClasses.join(' ')}>
<div className={styles.container}>{children}</div>
<footer className={styles.footer}>{footerButton}</footer>
<footer className={styles.footer}>
<div className={styles.footerSlot} />
<div className={styles.buttonSlot}>{footerButton}</div>
</footer>
</div>
);
}
Loading