@star-insure/sdk 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import Button from './Button';
2
2
  import Card from './Card';
3
3
  import Pagination from './Pagination';
4
+ import SimplePagination from './SimplePagination';
4
5
  import ToastItem from './ToastItem';
5
6
  import Toasts from './Toasts';
6
7
  import Modal from './Modal';
@@ -9,6 +10,7 @@ export {
9
10
  Button,
10
11
  Card,
11
12
  Pagination,
13
+ SimplePagination,
12
14
  ToastItem,
13
15
  Toasts,
14
16
  Modal,
@@ -1,13 +1,17 @@
1
1
  import React from 'react';
2
+ import cn from 'classnames';
2
3
 
3
4
  interface Props {
4
5
  children: React.ReactNode;
5
6
  className?: string;
7
+ condensed?: true;
6
8
  }
7
9
 
8
- export default function TableCell({ children, className = '' }: Props) {
10
+ export default function TableCell({ children, className, condensed }: Props) {
9
11
  return (
10
- <td className={`${className} px-3 py-3 text-sm text-gray-500`}>
12
+ <td className={cn(className, 'px-3 py-3 text-sm text-gray-500', {
13
+ 'w-0 whitespace-nowrap': condensed,
14
+ })}>
11
15
  {children}
12
16
  </td>
13
17
  )
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { Link } from '@inertiajs/react';
3
+ import cn from 'classnames';
3
4
 
4
5
  interface Props {
5
6
  children: React.ReactNode;
6
7
  className?: string;
7
8
  textAlign?: 'left' | 'right' | 'center';
8
9
  sort?: string;
10
+ condensed?: true;
9
11
  }
10
12
 
11
13
  export default function TableHeader({
@@ -13,6 +15,7 @@ export default function TableHeader({
13
15
  className = '',
14
16
  sort,
15
17
  textAlign = 'left',
18
+ condensed,
16
19
  }: Props) {
17
20
  const [sortLink, setSortLink] = React.useState<string>('');
18
21
 
@@ -39,7 +42,9 @@ export default function TableHeader({
39
42
  'text-left justify-between';
40
43
 
41
44
  return (
42
- <th className={`${className} py-3.5 px-3 text-sm font-semibold text-left`}>
45
+ <th className={cn(className, 'py-3.5 px-3 text-sm font-semibold text-left', {
46
+ 'w-0 whitespace-nowrap': condensed,
47
+ })}>
43
48
  <div className={`flex items-center gap-3 ${textAlignClass}`}>
44
49
  {children}
45
50
  {sort && (