Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification renders double close button #65

Closed
groundfloorwebb opened this issue Sep 16, 2022 · 5 comments
Closed

Notification renders double close button #65

groundfloorwebb opened this issue Sep 16, 2022 · 5 comments
Labels
question Further information is requested

Comments

@groundfloorwebb
Copy link

First off, great library, keep up the good work!

I'm using @oruga-ui/oruga-next 0.5.6 and @oruga-ui/theme-bulma 0.2.7 in a Vue 3 app with fontawesome. When I open a notification like this

	const { oruga } = useProgrammatic();
	oruga.notification.open({
		message: 'This is a test error message',
		variant: 'danger',
		closable: true,
	});

oruga creates a notification with a double close button like this

Screen Shot 2022-09-16 at 12 39 03 PM

This issue is theme applies bulma's delete class to the close element (creating the circular close button using css) and also generates an icon using the default value of the closeIcon prop in the component. I was able to get around this problem by passing an empty string for closeIcon in my config like this:

import oruga from '@oruga-ui/oruga-next';
import { bulmaConfig } from '@oruga-ui/theme-bulma';
import { merge } from 'lodash';

export const overrideConfig = {
	notification: {
		// This removes a duplicate close icon
		closeIcon: '',
	},
};

app.use(oruga, merge(bulmaConfig, overrideConfig));

I would recommend making this a part of the theme for a smoother dev experience.

@jtommy
Copy link
Member

jtommy commented Sep 16, 2022

Can you open a PR to remove in the config file?

@groundfloorwebb
Copy link
Author

@jtommy how's this? #66

@groundfloorwebb
Copy link
Author

Also, looks like this is only an issue when using the FontAwesomeIcon component to render the icons.

@jtommy
Copy link
Member

jtommy commented Sep 17, 2022

@groundfloorwebb I'm running the demo project and it looks ok without any changes... (using SVG or CSS mode)

image

Can you reproduce it on codepen or similar?

@jtommy jtommy added the question Further information is requested label Sep 17, 2022
@groundfloorwebb
Copy link
Author

Well looks like the real issue was i was including a snippet of buefy css leftover from the previous version of our design system. With that code removed the icon is still rendered but has a size of 0px, just like the example code. I feel silly, but the good news is this resolved another strange issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants