Junior Garcia d90ad05b13
Alert component (#3982)
* feat(alert): began the work on alert component

* fix(readme): making correction

* chore(deps): change to 2.0.0

* chore(docs): update README.md

* feat(theme): init alert tv

* chore(alert): update package.json

* feat(alert): init alert storybook structure

* chore(changeset): add changeset

* chore(changeset): change to minor

* chore(alert): revise alert package.json

* feat(alert): init test structure

* chore(deps): pnpm-lock.yaml

* feat(alert): initailized theme and basic structure

* feat(alert): completed use-alert.ts and alert.tsx

* feat(alert): remove innerWrapper, replace helperWrapper with mainWrapper, adding isCloseable prop

* feat(alert): adding isCloseable prop to baseWrapper dependency

* feat(alert): setting the default value of isCloseable prop to true

* feat(alert): moving CloseIcon inside the button

* feat(alert): updated package.json

* feat(alert): default variant and default story

* feat(alert): adding color and radius stories

* feat(alert): completed the styling

* feat(alert): add stories for isCloseable prop and restyle other stories

* feat(alert): correcting ref type

* feat(alert): add test cases

* feat(alert): remove startContent and endContent props

* feat(alert): make styling more accurate

* feat(alert): fixed default props

* feat(alert): fixed theme docs

* feat(alert): add logic for icons

* feat(alert): begin to add docs

* chore(alert): implement the changes suggested in code review

* feat(alert): add onclose prop to alert

* feat(alert): add test cases

* docs(alert): add onClose  event

* feat(docs): add alert to routes.json

* fix(alert): correct the text colors

* docs(alert): fix imports and syntax errors

* chore(alert): implement the changes suggested in code review

* chore(alert): lint the code and change isCloseable to isClosable

* chore(alert): lint the code

* chore(alert): run pnpm  i

* fix(alert): fix the logic for close button and add test case

* docs(alert): fix docs, change isCloseable to isClosable and change docs for isClosable property

* chore(alert): add the support for RTL, refactor the code and fix the typos

* docs(alert): grammer issues fix

* fix(alert): replace rtl with ms

* chore(alert): custom style and custom implementation, remove isClosable={false}, refactor, fix typos

* chore(alert): linting and implement coderabbit suggestions

* chore(alert): refactor and typos fix

* chore(alert): add import for closeIcon

* chore(alert): add props for closeIcon

* chore(alert): refactor fixes

* chore(alert): implement ryo-manba's suggestion on close Icon

* chore(alert): make alert more responsive

* chore(alert): fix grammer issues suggested by coderabbit

* fix(alert): add max-w property to make alert responsive

* chore(alert): improve responsiveness  and refactor alertIcon

* chore(alert): add missing dependency to useMemo

* chore(alert): implement coderabbit's suggestions

* chore(alert): update docs and refactor

* chore(alert): refactor alertIcon and implement coderabbit's suggestion

* chore: fixes

---------

Co-authored-by: Abhinav Agarwal <abhinavagrawal700@gmail.com>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
Co-authored-by: Abhinav Agarwal <78839973+abhinav700@users.noreply.github.com>
2024-11-04 10:54:34 -03:00

26 lines
468 B
TypeScript

const App = `import {Alert} from "@nextui-org/react";
export default function App() {
return (
<div className="flex flex-col gap-4 w-full">
<Alert variant="solid">
A solid variant alert
</Alert>
<Alert variant="bordered">
A bordered variant alert
</Alert>
<Alert variant="flat">
A flat variant alert
</Alert>
</div>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};