Skip to content

Commit

Permalink
fix: better question-icon position
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-efremoff committed Mar 6, 2024
1 parent 81a8f92 commit 258f9d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/dialog/Dialog/Dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,9 @@
padding-left: 32px;
padding-right: 32px;
}

&__q-icon {
position: relative;
top: 2px;
}
}
2 changes: 1 addition & 1 deletion src/dialog/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class Dialog<
delayClosing={150}
placement={['bottom', 'top', 'right']}
>
<TooltipIcon />
<TooltipIcon className={bDialog('q-icon')} />
</Popover>
</div>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/dialog/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ export function WarningIcon(props: React.SVGProps<SVGSVGElement>) {
);
}

export function TooltipIcon() {
export function TooltipIcon({className}: {className?: string} = {}) {
return (
<svg
className={className}
width="16"
height="16"
viewBox="0 0 16 16"
Expand Down
2 changes: 1 addition & 1 deletion src/stories/dialog/00_Base_controls.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DialogWithSelectStories extends Component {
}

function makeField<T extends string, E extends object>(type: T, extras?: E) {
const res = {type, name: type, required: true, caption: type};
const res = {type, name: type, required: true, caption: type, tooltip: `Help for ${type}`};
if (extras) {
Object.assign(res, {extras});
}
Expand Down

0 comments on commit 258f9d7

Please sign in to comment.