@symply.io/basic-components 1.8.0 → 1.8.1-alpha.1
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/Copyright/index.js +4 -2
- package/Copyright/types.d.ts +5 -0
- package/README.md +11 -1
- package/package.json +1 -1
package/Copyright/index.js
CHANGED
|
@@ -15,8 +15,10 @@ import Typography from "@mui/material/Typography";
|
|
|
15
15
|
import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
|
16
16
|
import useCustomTheme from "../useCustomTheme";
|
|
17
17
|
function Copyright(props) {
|
|
18
|
-
var primaryColor = props.primaryColor, secondaryColor = props.secondaryColor;
|
|
18
|
+
var year = props.year, ownerHref = props.ownerHref, ownerLabel = props.ownerLabel, allRightsReservedLabel = props.allRightsReservedLabel, displayAllRightsReserved = props.displayAllRightsReserved, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor;
|
|
19
19
|
var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
|
|
20
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Typography, __assign({ sx: { fontSize: 16, fontWeight: 400 }, color: "textSecondary", align: "center" }, { children: ["Copyright © ", _jsx(Link, __assign({ color: "inherit", href:
|
|
20
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Typography, __assign({ sx: { fontSize: 16, fontWeight: 400 }, color: "textSecondary", align: "center" }, { children: ["Copyright © ", year !== null && year !== void 0 ? year : new Date().getFullYear(), "\u00A0", ownerHref ? (_jsx(Link, __assign({ color: "inherit", href: ownerHref }, { children: ownerLabel !== null && ownerLabel !== void 0 ? ownerLabel : "Symply Software Inc" }))) : (ownerLabel !== null && ownerLabel !== void 0 ? ownerLabel : "Symply Software Inc"), ".", displayAllRightsReserved
|
|
21
|
+
? " ".concat(allRightsReservedLabel || "All Rights Reserved", ".")
|
|
22
|
+
: ""] })) })));
|
|
21
23
|
}
|
|
22
24
|
export default Copyright;
|
package/Copyright/types.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
export interface CopyrightProps {
|
|
3
|
+
year?: string;
|
|
4
|
+
ownerLabel: string;
|
|
5
|
+
ownerHref?: string;
|
|
6
|
+
allRightsReservedLabel?: string;
|
|
7
|
+
displayAllRightsReserved?: boolean;
|
|
3
8
|
primaryColor?: CSSProperties["color"];
|
|
4
9
|
secondaryColor?: CSSProperties["color"];
|
|
5
10
|
}
|
package/README.md
CHANGED
|
@@ -297,7 +297,7 @@ import ClickableFabButton from '@symply.io/basic-components/ClickableFabButton';
|
|
|
297
297
|
| -------- | ------------------------------------------------------------ | --------- | -------- | ------------------------------------------------------------ |
|
|
298
298
|
| color | "primary" \|"secondary" \|"success" \|"error" \|"info" \|"warning" | "primary" | false | The button color. |
|
|
299
299
|
| disabled | bool | false | false | If `true`, the button would be disabled. |
|
|
300
|
-
| fabIcon | ReactElement | | true | The icon element
|
|
300
|
+
| fabIcon | ReactElement | | true | The icon element. |
|
|
301
301
|
| onClick | func | | true | The function for button clicking.<br />**Signature:**<br/>`function() => unknown` |
|
|
302
302
|
| text | string | | true | The button text. |
|
|
303
303
|
|
|
@@ -315,6 +315,16 @@ import { Copyright } from '@symply.io/basic-components/';
|
|
|
315
315
|
import Copyright from '@symply.io/basic-components/Copyright';
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
+
<h5>Props</h5>
|
|
319
|
+
|
|
320
|
+
| Name | Type | Default | Required | Description |
|
|
321
|
+
| ------------------------ | ------ | -------------------- | -------- | -------------------------------------------------------- |
|
|
322
|
+
| allRightsReservedLabel | string | All Rights Reserved. | false | The customized label for "All Rights Reserved". |
|
|
323
|
+
| displayAllRightsReserved | bool | false | false | If `true` , the "All Rights Reserved" will be displayed. |
|
|
324
|
+
| ownerHref | string | | false | The href ot the owner. |
|
|
325
|
+
| ownerLabel | string | Symply Software Inc | false | The owner of the copyright. |
|
|
326
|
+
| year | string | current year | false | The year of the copyright. |
|
|
327
|
+
|
|
318
328
|
|
|
319
329
|
|
|
320
330
|
<h3>DataTable</h3>
|