Commit 501d974e by Johannes Schill

Remove the fixed widths and make it possible to pass it in as a prop instead #13425

parent 77d06a09
......@@ -8,10 +8,10 @@ interface ExtendedOptionProps extends OptionProps<any> {
}
export const Option = (props: ExtendedOptionProps) => {
const { children, isSelected, data } = props;
const { children, isSelected, data, className } = props;
return (
<components.Option {...props}>
<div className={`description-picker-option__button btn btn-link width-19`}>
<div className={`description-picker-option__button btn btn-link ${className}`}>
{isSelected && <i className="fa fa-check pull-right" aria-hidden="true" />}
<div className="gf-form">{children}</div>
<div className="gf-form">
......
......@@ -7,10 +7,10 @@ export interface Props {
}
export const PickerOption = (props: OptionProps<any>) => {
const { children } = props;
const { children, className } = props;
return (
<components.Option {...props}>
<div className={`description-picker-option__button btn btn-link width-19`}>{children}</div>
<div className={`description-picker-option__button btn btn-link ${className}`}>{children}</div>
</components.Option>
);
};
......
......@@ -8,10 +8,10 @@ interface ExtendedOptionProps extends OptionProps<any> {
}
export const PickerOption = (props: ExtendedOptionProps) => {
const { children, data } = props;
const { children, data, className } = props;
return (
<components.Option {...props}>
<div className={`description-picker-option__button btn btn-link width-19`}>
<div className={`description-picker-option__button btn btn-link ${className}`}>
{data.avatarUrl && <img src={data.avatarUrl} alt={data.label} className="user-picker-option__avatar" />}
{children}
</div>
......
......@@ -3,7 +3,7 @@
exports[`PickerOption renders correctly 1`] = `
<div>
<div
className="description-picker-option__button btn btn-link width-19"
className="description-picker-option__button btn btn-link"
>
<img
alt="User picker label"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment