Fix install warning display and make it reactive
This commit is contained in:
parent
2dda151a49
commit
bd278b2688
5 changed files with 39 additions and 24 deletions
23
resources/scripts/components/elements/alert/Alert.tsx
Normal file
23
resources/scripts/components/elements/alert/Alert.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { ExclamationIcon } from '@heroicons/react/outline';
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
interface AlertProps {
|
||||
type: 'warning';
|
||||
className?: string;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export default ({ className, children }: AlertProps) => {
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
'flex items-center border-l-8 border-yellow-500 text-gray-50 bg-yellow-500/25 rounded-md shadow px-4 py-3',
|
||||
className
|
||||
)}
|
||||
>
|
||||
<ExclamationIcon className={'w-6 h-6 text-yellow-500 mr-2'} />
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
1
resources/scripts/components/elements/alert/index.ts
Normal file
1
resources/scripts/components/elements/alert/index.ts
Normal file
|
@ -0,0 +1 @@
|
|||
export { default as Alert } from './Alert';
|
Loading…
Add table
Add a link
Reference in a new issue