UNPKG

@visa/nova-react

Version:

Visa Product Design System Nova React library

18 lines (17 loc) 1.39 kB
/** * Copyright (c) 2025 Visa, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **/ import{jsxs as e,jsx as i}from"react/jsx-runtime";import r from"clsx";import{forwardRef as t,useId as l}from"react";const a="v-icon",o={high:"48",low:"24",tiny:"16"},s=t((({ariaBaseId:t,brand:s="generic",className:c,description:n,iconName:d="help",resolution:$="low",rtl:h,title:m,...f},p)=>{const u=l(),x=t||u,b=o[$],g=`${s}-${d}-${$}`;return e("svg",{"aria-hidden":"true","aria-labelledby":`${m?`title-${x}`:""}${m&&n?",":""}${n?`description-${x}`:""}`||void 0,className:r(a,s&&`${a}-${s}`,$&&`${a}-${$}`,h&&`${a}-rtl`,c),focusable:"false",height:b,ref:p,viewBox:`0 0 ${b} ${b}`,width:b,...f,children:[m&&i("title",{id:`title-${x}`,children:m}),n&&i("desc",{id:`description-${x}`,children:n}),i("use",{href:g,xlinkHref:g})]})}));s.displayName="Icon";export{s as default};