From 1efeab174e81a3178a92c94d892b9cfdd0f43659 Mon Sep 17 00:00:00 2001 From: Yannick Date: Fri, 1 Jul 2022 15:39:53 +0200 Subject: [PATCH 1/2] Add required field --- src/components/InputControl/InputControl.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/InputControl/InputControl.tsx b/src/components/InputControl/InputControl.tsx index 8fe875a..3e607bc 100644 --- a/src/components/InputControl/InputControl.tsx +++ b/src/components/InputControl/InputControl.tsx @@ -35,6 +35,10 @@ export interface InputControlProps { * Type of the input */ type?: string; + /** + * If the input is required or not + */ + required?: boolean; /** * Custom classes for the label */ @@ -54,6 +58,7 @@ export const InputControl = ({ placeholder, helper, onChange, + required, ...props }: InputControlProps) => { const uniqueName = name ?? id; @@ -68,6 +73,7 @@ export const InputControl = ({ value={value} className={clsx("input", className)} placeholder={placeholder} + required={required} onChange={(event) => onChange({ value: event?.target.value, id })} aria-describedby={helper ? `${uniqueName}-help` : undefined} {...props} From dee8095287c77336f6e89e227f78be5c72a81a2e Mon Sep 17 00:00:00 2001 From: Yannick Date: Fri, 1 Jul 2022 16:18:34 +0200 Subject: [PATCH 2/2] Mellow UI 0.11.1 --- package-lock.json | 4 ++-- package.json | 2 +- src/components/SelectControl/SelectControl.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5599b49..c48b89b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sippy-platform/mellow-ui", - "version": "0.11.0", + "version": "0.11.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sippy-platform/mellow-ui", - "version": "0.11.0", + "version": "0.11.1", "license": "AGPL-3.0-or-later", "dependencies": { "@headlessui/react": "1.6.5", diff --git a/package.json b/package.json index eeaa5ba..6ca5a78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sippy-platform/mellow-ui", - "version": "0.11.0", + "version": "0.11.1", "description": "React components for the Mellow Design System.", "main": "./dist/mellow-ui.umd.js", "module": "./dist/mellow-ui.es.js", diff --git a/src/components/SelectControl/SelectControl.tsx b/src/components/SelectControl/SelectControl.tsx index 9476233..49b83b3 100644 --- a/src/components/SelectControl/SelectControl.tsx +++ b/src/components/SelectControl/SelectControl.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, Fragment, useMemo } from "react"; +import { ReactNode, Fragment, useMemo } from "react"; import { InputLabel } from "..";