1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

Merge branch 'dev' into 'master'

Dev

See merge request turris/reforis/foris-js!225
This commit is contained in:
Aleksandr Gumroian 2024-06-28 14:22:41 +02:00
commit 8e0c60a576
7 changed files with 25 additions and 15 deletions

View File

@ -8,15 +8,21 @@ and this project adheres to
## [Unreleased]
## [6.0.2] - 2024-06-28
### Added
- Added className prop to CheckBox and Radio components
## [6.0.1] - 2024-06-26
### Added
- Add className prop to Switch component
- Added className prop to Switch component
### Changed
- Update dependencies in package.json
- Updated dependencies in package.json
- NPM audit fix
## [6.0.0] - 2024-06-11
@ -325,7 +331,8 @@ and this project adheres to
## [0.0.7] - 2019-09-02
[unreleased]:
https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.1...master
https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.2...master
[6.0.2]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.1...v6.0.2
[6.0.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v6.0.0...v6.0.1
[6.0.0]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v5.6.1...v6.0.0
[5.6.1]: https://gitlab.nic.cz/turris/reforis/foris-js/-/compare/v5.6.0...v5.6.1

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "foris",
"version": "6.0.1",
"version": "6.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "foris",
"version": "6.0.1",
"version": "6.0.2",
"license": "GPL-3.0",
"dependencies": {
"axios": "^1.7.2",

View File

@ -1,6 +1,6 @@
{
"name": "foris",
"version": "6.0.1",
"version": "6.0.2",
"description": "Foris JS library is a set of components and utils for reForis application and plugins.",
"author": "CZ.NIC, z.s.p.o.",
"repository": {

View File

@ -17,17 +17,19 @@ CheckBox.propTypes = {
helpText: PropTypes.string,
/** Control if checkbox is clickable */
disabled: PropTypes.bool,
/** Additional class name */
className: PropTypes.string,
};
CheckBox.defaultProps = {
disabled: false,
};
function CheckBox({ label, helpText, disabled, ...props }) {
function CheckBox({ label, helpText, disabled, className, ...props }) {
const uid = useUID();
return (
<div className="mb-3 form-check">
<div className={`${className || "mb-3"} form-check`.trim()}>
<input
className="form-check-input"
type="checkbox"

View File

@ -83,12 +83,13 @@ Radio.propTypes = {
id: PropTypes.string.isRequired,
inline: PropTypes.bool,
helpText: PropTypes.string,
className: PropTypes.string,
};
export function Radio({ label, id, helpText, inline, ...props }) {
export function Radio({ label, id, helpText, inline, className, ...props }) {
return (
<div
className={`mb-2 ${inline ? "form-check form-check-inline" : ""}`.trim()}
className={`${className || "mb-3"} ${inline ? "form-check form-check-inline" : ""}`.trim()}
>
<input
id={id}

View File

@ -11,7 +11,7 @@ exports[`<RadioSet/> Render radio set 1`] = `
Radios set label
</label>
<div
class="mb-2"
class="mb-3"
>
<input
checked=""
@ -29,7 +29,7 @@ exports[`<RadioSet/> Render radio set 1`] = `
</label>
</div>
<div
class="mb-2"
class="mb-3"
>
<input
class="form-check-input me-2"
@ -46,7 +46,7 @@ exports[`<RadioSet/> Render radio set 1`] = `
</label>
</div>
<div
class="mb-2"
class="mb-3"
>
<input
class="form-check-input me-2"

View File

@ -568,7 +568,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ GHz
+ </label>
+ <div
+ class="mb-2 form-check form-check-inline"
+ class="mb-3 form-check form-check-inline"
+ >
+ <input
+ class="form-check-input me-2"
@ -585,7 +585,7 @@ exports[`<WiFiSettings/> Snapshot one module enabled. 1`] = `
+ </label>
+ </div>
+ <div
+ class="mb-2 form-check form-check-inline"
+ class="mb-3 form-check form-check-inline"
+ >
+ <input
+ checked=""