-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from lion5/feat/gallery-inputs
feat(GalleryInputs): Introduce New Component
- Loading branch information
Showing
57 changed files
with
2,200 additions
and
406 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/core/src/components/cards/CardBadgeSuccess/CardBadgeSuccess.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import CardBadgeSuccess from './CardBadgeSuccess.vue' | ||
import ItemCard from '../ItemCard/ItemCard.vue' | ||
import { Meta, StoryObj } from '@storybook/vue3' | ||
|
||
export default { | ||
component: CardBadgeSuccess | ||
} as Meta<typeof CardBadgeSuccess> | ||
type Story = StoryObj<typeof CardBadgeSuccess> | ||
|
||
export const Default: Story = { | ||
render: (args: unknown) => ({ | ||
components: { CardBadgeSuccess, ItemCard }, | ||
setup() { | ||
return { args } | ||
}, | ||
template: ` | ||
<ItemCard | ||
style="display: grid;background-color: var(--color-primary-surface);aspect-ratio: 1/1;width: 200px;overflow: hidden;"> | ||
<CardBadgeSuccess v-bind="args">Badge slot text</CardBadgeSuccess> | ||
</ItemCard>` | ||
}), | ||
args: { | ||
tooltipText: 'This is a tooltip text', | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
packages/core/src/components/cards/CardBadgeSuccess/CardBadgeSuccess.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<CardBadgeBase class="card-badge-success"> | ||
<TooltipIcon | ||
:id="tooltipId" | ||
:tooltip-text="tooltipText" | ||
style="--tooltip-right: 0; --tooltip-bottom: 100%;" | ||
> | ||
<template #tooltipIcon> | ||
<BaseIcon icon="bi-check" /> | ||
</template> | ||
</TooltipIcon> | ||
</CardBadgeBase> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
.card-badge-success { | ||
--image-card-badge-color: var(--color-success); | ||
--image-card-badge-background-color: var(--color-success-100); | ||
} | ||
</style> | ||
<script setup lang="ts"> | ||
import BaseIcon from '@core/components/icons/BaseIcon.vue' | ||
import CardBadgeBase from '@core/components/cards/CardBadgeBase/CardBadgeBase.vue' | ||
import TooltipIcon from '@core/components/utils/TooltipIcon/TooltipIcon.vue' | ||
import { useId } from 'vue' | ||
defineProps<{ | ||
/** | ||
* Is displayed when the user hovers over the badge | ||
*/ | ||
tooltipText: string | ||
}>() | ||
const tooltipId = useId() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.