UNPKG

@progress/kendo-react-common

Version:

React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package

76 lines (75 loc) 2.23 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2023 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *-------------------------------------------------------------------------------------------*/ import * as React from 'react'; import { BaseIconProps } from './BaseIconProps'; /** * @hidden */ export interface SVGIcon { /** * The unique name of the icon. */ name: string; /** * The entire SVG content of the icon. */ content: string; /** * The [viewBox](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox) * definition that should be used for the icon. */ viewBox: string; } /** * @hidden */ export interface SvgIconHandle { /** * The SvgIconHandle element. */ element: HTMLSpanElement | null; } /** * Represents the props of the [KendoReact SvgIcon component]({% slug overview_svgicon %}). */ export interface SvgIconProps extends BaseIconProps, React.SVGAttributes<HTMLOrSVGElement> { /** * Specifies the SVG icon. * * * The possible keys are: * * `name`&mdash;The unique name of the icon. * * `content`&mdash;The entire SVG content of the icon. * * `viewBox`&mdash;The viewBox definition that should be used for the icon. */ icon?: SVGIcon; /** * Specifies the viewBox of the custom SVG icon. */ viewBox?: string; /** * Specifies a list of CSS classes that will be added to the svg element. */ svgClassName?: string; /** * Sets additional CSS styles to the svg element. */ svgStyle?: React.CSSProperties; } /** * Represents the [KendoReact SvgIcon component]({% slug overview_svgicon %}). * * @example * ```jsx * import { accessibility } from '@progress/kendo-svg-icons'; * * const App = () => { * return ( * <SvgIcon icon={accessibility} /> * ); * }; * ReactDOM.render(<App />, document.querySelector('my-app')); * ``` */ export declare const SvgIcon: React.ForwardRefExoticComponent<SvgIconProps & React.RefAttributes<SvgIconHandle | null>>;