siam-ui-utils 2.2.16 → 2.2.18

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siam-ui-utils",
3
- "version": "2.2.16",
3
+ "version": "2.2.18",
4
4
  "keywords": [
5
5
  "ampf-react",
6
6
  "ampf-utils",
package/src/App.jsx CHANGED
@@ -13,7 +13,7 @@ import './assets/css/vendor/bootstrap.min.css';
13
13
  import { WhereByRoom } from './where-by-room';
14
14
  import { ViewLayout } from './view-layout';
15
15
  import { CopyLink } from './copy-link';
16
- import Timer from './timer';
16
+ import { Timer } from './timer';
17
17
 
18
18
  const slots = [
19
19
  {
@@ -145,7 +145,11 @@ const App = () => {
145
145
  <AccordionItem>
146
146
  <AccordionHeader targetId="8">Timer</AccordionHeader>
147
147
  <AccordionBody accordionId="8">
148
- <Timer initialMinutes={2} active={true} />
148
+ <Timer
149
+ initialMinutes={2}
150
+ active={true}
151
+ style={{ color: 'green' }}
152
+ />
149
153
  </AccordionBody>
150
154
  </AccordionItem>
151
155
  </Accordion>
@@ -29,6 +29,7 @@ const Timer = ({
29
29
  icon = true,
30
30
  className = '',
31
31
  active = true,
32
+ style = {},
32
33
  }) => {
33
34
  const initialMs = initialMinutes * 60 * 1000;
34
35
  const [ms, setMs] = useState(initialMs);
@@ -49,11 +50,13 @@ const Timer = ({
49
50
  const timerColorClass = getTimerColorClass(ms, initialMs);
50
51
 
51
52
  return (
52
- <span className={`av-video-timer timer ${timerColorClass} ${className}`}>
53
+ <span
54
+ className={`av-video-timer timer ${timerColorClass} ${className}`}
55
+ style={style}
56
+ >
53
57
  {icon && <i className="icon-clock timer" />}
54
58
  {formatTiempo(ms)}
55
59
  </span>
56
60
  );
57
61
  };
58
-
59
- export default Timer;
62
+ export { Timer };