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

SRML-50 - Update change log and fix toaster gap between toaster X button and content #224

Merged
merged 4 commits into from
Dec 20, 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Using Force UI as a dependency in package.json -

```json
"dependencies": {
"@bsf/force-ui": "git+https://github.com/brainstormforce/force-ui#1.3.2"
"@bsf/force-ui": "git+https://github.com/brainstormforce/force-ui#1.3.3"
}
```

Expand All @@ -28,7 +28,7 @@ npm install
Or you can directly run the following command to install the package -

```bash
npm i -S @bsf/force-ui@git+https://github.com/brainstormforce/force-ui.git#1.3.2
npm i -S @bsf/force-ui@git+https://github.com/brainstormforce/force-ui.git#1.3.3
```

<br />
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 1.3.3 - 20th December, 2024
Fixed - React `Each child in a list should have a unique "key" prop` console warning.
Fixed - Toaster content overlapping with the close button.

Version 1.3.2 - 17th December, 2024
Fixed - Adjusted the color of the Switch component label and help text.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bsf/force-ui",
"version": "1.3.2",
"version": "1.3.3",
"description": "Library of components for the BSF project",
"main": "./dist/force-ui.js",
"module": "./dist/force-ui.js",
Expand Down
10 changes: 9 additions & 1 deletion src/components/toaster/toaster.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Meta, StoryFn } from '@storybook/react';
import { Toaster } from './toaster';
import { toast } from './controller';
import { nanoid } from 'nanoid';
import { useState, useEffect } from 'react';

const meta: Meta<typeof Toaster> = {
title: 'Atoms/Toaster',
Expand Down Expand Up @@ -62,9 +64,15 @@ export default meta;
type Story = StoryFn<typeof Toaster>;

const Template: Story = ( args ) => {
const [ keyId, setKeyId ] = useState( nanoid() );

useEffect( () => {
setKeyId( nanoid() );
}, [ args ] );

return (
<div>
<Toaster { ...args } key={ args.position } />
<Toaster { ...args } key={ keyId } />
<div className="h-[100dvh] flex flex-col items-center justify-center">
<div className="flex gap-2">
<button
Expand Down
2 changes: 1 addition & 1 deletion src/components/toaster/toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export const Toast = ( {
<div className="self-start flex items-center justify-center [&_svg]:size-5 shrink-0">
{ getIcon( { variant, icon, theme } ) }
</div>
<div className="flex flex-col items-start justify-start gap-0.5">
<div className="flex flex-col items-start justify-start gap-0.5 mr-6">
{ getTitle( { title, theme } ) }
{ getContent( { content, theme } ) }
{
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"force-ui": "1.3.2"
"force-ui": "1.3.3"
}
Loading